NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Reflection Emit Abstractions

The Reflection Emit abstractions correspond closely to the object model that underlies the runtime as described in the Virtual Object System (VOS) specification,. In the following sections, the abstractions are described in alphabetical order.

AssemblyBuilder. An assembly is a configured set of loadable code modules and other resources that together implement a unit of functionality. Assemblies themselves have names that form the basis of the VOS naming hierarchy; see Assembly Overview for details.

This document classifies assemblies as static or dynamic. A static assembly is an assembly that is loaded from disk. A dynamic assembly is an assembly that is created using the Reflection Emit APIs.

The AssemblyBuilder class is used to define and represent a dynamic assembly. The AssemblyBuilder class inherits from the Assembly class.

ConstructorBuilder. A constructor describes an operation that instantiates a type. ConstructorBuilder is used to define and represent a constructor. The ConstructorBuilder class inherits from the ConstructorInfo class.

CustomAttributeBuilder. The CustomAttributeBuilder class is a helper class used to define custom attributes.

EnumBuilder. EnumBuilder is a helper class used to define and represent an enumeration type. The EnumBuilder class inherits from the Type class.

EventBuilder. Events of an object type specify named state transitions in which subscribers can register or unregister interest via accessor methods. The EventBuilder class is used to define and represent an event. The EventBuilder class inherits from the EventInfo class.

FieldBuilder. A field is a named subdivision of a value. A type can have field members. A module or a type can also reference fields defined in the .sdata section of a PE file. The FieldBuilder class is used to define and represent a field. The FieldBuilder class inherits from the FieldInfo class.

ILGenerator. The runtime JIT compiler translates instructions in the Intermediate Language (IL) to native code. ILGenerator is used to define and represent IL.

Label. The Label class is an opaque representation of a label used by the ILGenerator class. Labels correspond to specific locations in the IL code.

LocalBuilder. The LocalBuilder class represents a local variable declared within the body of a method.

MethodBuilder. A method describes an operation that can be performed on values of a type. MethodBuilder is used to define and represent a method. The MethodBuilder class inherits from the MethodInfo class.

ModuleBuilder. A module is a compilation unit, an executable unit, a development unit, a deployment unit, or a runtime unit. Modules can have global fields. A module created using the Reflection Emit APIs is called a dynamic module for the duration of the run in which the module was created. The term dynamic module does not apply if the module is saved to disk and then loaded from disk. Dynamic modules that can be saved to disk as a PE file are called persistable dynamic modules. Dynamic modules that exist only in memory only are called transient dynamic modules. The ModuleBuilder class is used to define and represent a module. The ModuleBuilder class inherits from the Module class.

ParameterBuilder. Parameters are locations that represent arguments of methods or constructors. The ParameterBuilder class is used to define and represent a parameter. The ParameterBuilder inherits from the ParameterInfo class.

PropertyBuilder. Properties of an object type specify named values that are accessible via accessor methods that read and write the value. The PropertyBuilder class is used to define and represent a property. The PropertyBuilder class does not inherit from the PropertyInfo class. This will be fixed in a future release.

TypeBuilder. Types describe values. The type defines the allowable values and the allowable operations supported by the values of the type. Types can have members that are types, methods, fields, properties, or events. The TypeBuilder class is used to define and represent a type. The TypeBuilder class inherits from the Type class.