Export (0) Print
Expand All

ModuleBuilder Methods

The ModuleBuilder type exposes the following members.

  Name Description
Public method CreateGlobalFunctions Completes the global function definitions and global data definitions for this dynamic module.
Public method DefineDocument Defines a document for source.
Public method DefineEnum Defines an enumeration type that is a value type with a single non-static field called value__ of the specified type.
Public method DefineGlobalMethod(String, MethodAttributes, Type, Type[]) Defines a global method with the specified name, attributes, return type, and parameter types.
Public method DefineGlobalMethod(String, MethodAttributes, CallingConventions, Type, Type[]) Defines a global method with the specified name, attributes, calling convention, return type, and parameter types.
Public method DefineGlobalMethod(String, MethodAttributes, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) Defines a global method with the specified name, attributes, calling convention, return type, custom modifiers for the return type, parameter types, and custom modifiers for the parameter types.
Public method DefineInitializedData Defines an initialized data field in the .sdata section of the portable executable (PE) file.
Public method DefineManifestResource Defines a binary large object (BLOB) that represents a manifest resource to be embedded in the dynamic assembly.
Public method DefinePInvokeMethod(String, String, MethodAttributes, CallingConventions, Type, Type[], CallingConvention, CharSet) Defines a PInvoke method with the specified name, the name of the DLL in which the method is defined, the attributes of the method, the calling convention of the method, the return type of the method, the types of the parameters of the method, and the PInvoke flags.
Public method DefinePInvokeMethod(String, String, String, MethodAttributes, CallingConventions, Type, Type[], CallingConvention, CharSet) Defines a PInvoke method with the specified name, the name of the DLL in which the method is defined, the attributes of the method, the calling convention of the method, the return type of the method, the types of the parameters of the method, and the PInvoke flags.
Public method DefineResource(String, String) Defines the named managed embedded resource to be stored in this module.
Public method DefineResource(String, String, ResourceAttributes) Defines the named managed embedded resource with the given attributes that is to be stored in this module.
Public method DefineType(String) Constructs a TypeBuilder for a private type with the specified name in this module.
Public method DefineType(String, TypeAttributes) Constructs a TypeBuilder given the type name and the type attributes.
Public method DefineType(String, TypeAttributes, Type) Constructs a TypeBuilder given type name, its attributes, and the type that the defined type extends.
Public method DefineType(String, TypeAttributes, Type, Int32) Constructs a TypeBuilder given the type name, the attributes, the type that the defined type extends, and the total size of the type.
Public method DefineType(String, TypeAttributes, Type, PackingSize) Constructs a TypeBuilder given the type name, the attributes, the type that the defined type extends, and the packing size of the type.
Public method DefineType(String, TypeAttributes, Type, Type[]) Constructs a TypeBuilder given the type name, attributes, the type that the defined type extends, and the interfaces that the defined type implements.
Public method DefineType(String, TypeAttributes, Type, PackingSize, Int32) Constructs a TypeBuilder given the type name, attributes, the type that the defined type extends, the packing size of the defined type, and the total size of the defined type.
Public method DefineUninitializedData Defines an uninitialized data field in the .sdata section of the portable executable (PE) file.
Public method DefineUnmanagedResource(Byte[]) Defines an unmanaged embedded resource given an opaque binary large object (BLOB) of bytes.
Public method DefineUnmanagedResource(String) Defines an unmanaged resource given the name of Win32 resource file.
Public method Equals Returns a value that indicates whether this instance is equal to the specified object. (Overrides Module.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method FindTypes Returns an array of classes accepted by the given filter and filter criteria. (Inherited from Module.)
Public method GetArrayMethod Returns the named method on an array class.
Public method GetArrayMethodToken Returns the token for the named method on an array class.
Public method GetConstructorToken(ConstructorInfo) Returns the token used to identify the specified constructor within this module.
Public method GetConstructorToken(ConstructorInfo, IEnumerable<Type>) Returns the token used to identify the constructor that has the specified attributes and parameter types within this module.
Public method GetCustomAttributes(Boolean) Returns all the custom attributes that have been applied to the current ModuleBuilder. (Overrides Module.GetCustomAttributes(Boolean).)
Public method GetCustomAttributes(Type, Boolean) Returns all the custom attributes that have been applied to the current ModuleBuilder, and that derive from a specified attribute type. (Overrides Module.GetCustomAttributes(Type, Boolean).)
Public method GetCustomAttributesData Returns information about the attributes that have been applied to the current ModuleBuilder, expressed as CustomAttributeData objects. (Overrides Module.GetCustomAttributesData().)
Public method GetField(String) Returns a field having the specified name. (Inherited from Module.)
Public method GetField(String, BindingFlags) Returns a module-level field, defined in the .sdata region of the portable executable (PE) file, that has the specified name and binding attributes. (Overrides Module.GetField(String, BindingFlags).)
Public method GetFields() Returns the global fields defined on the module. (Inherited from Module.)
Public method GetFields(BindingFlags) Returns all fields defined in the .sdata region of the portable executable (PE) file that match the specified binding flags. (Overrides Module.GetFields(BindingFlags).)
Public method GetFieldToken Returns the token used to identify the specified field within this module.
Public method GetHashCode Returns the hash code for this instance. (Overrides Module.GetHashCode().)
Public method GetMethod(String) Returns a method having the specified name. (Inherited from Module.)
Public method GetMethod(String, Type[]) Returns a method having the specified name and parameter types. (Inherited from Module.)
Public method GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) Returns a method having the specified name, binding information, calling convention, and parameter types and modifiers. (Inherited from Module.)
Protected method GetMethodImpl Returns the module-level method that matches the specified criteria. (Overrides Module.GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]).)
Public method GetMethods() Returns the global methods defined on the module. (Inherited from Module.)
Public method GetMethods(BindingFlags) Returns all the methods that have been defined at the module level for the current ModuleBuilder, and that match the specified binding flags. (Overrides Module.GetMethods(BindingFlags).)
Public method GetMethodToken(MethodInfo) Returns the token used to identify the specified method within this module.
Public method GetMethodToken(MethodInfo, IEnumerable<Type>) Returns the token used to identify the method that has the specified attributes and parameter types within this module.
Public method GetObjectData Provides an ISerializable implementation for serialized objects. (Inherited from Module.)
Public method GetPEKind Gets a pair of values indicating the nature of the code in a module and the platform targeted by the module. (Overrides Module.GetPEKind(PortableExecutableKinds, ImageFileMachine).)
Public method GetSignatureToken(SignatureHelper) Defines a token for the signature that is defined by the specified SignatureHelper.
Public method GetSignatureToken(Byte[], Int32) Defines a token for the signature that has the specified character array and signature length.
Public method GetSignerCertificate Returns an X509Certificate object corresponding to the certificate included in the Authenticode signature of the assembly which this module belongs to. If the assembly has not been Authenticode signed, null is returned. (Overrides Module.GetSignerCertificate().)
Public method GetStringConstant Returns the token of the given string in the module’s constant pool.
Public method GetSymWriter Returns the symbol writer associated with this dynamic module.
Public method GetType() Gets the Type of the current instance. (Inherited from Object.)
Public method GetType(String) Gets the named type defined in the module. (Overrides Module.GetType(String).)
Public method GetType(String, Boolean) Gets the named type defined in the module, optionally ignoring the case of the type name. (Overrides Module.GetType(String, Boolean).)
Public method GetType(String, Boolean, Boolean) Gets the named type defined in the module, optionally ignoring the case of the type name. Optionally throws an exception if the type is not found. (Overrides Module.GetType(String, Boolean, Boolean).)
Public method GetTypes Returns all the classes defined within this module. (Overrides Module.GetTypes().)
Public method GetTypeToken(String) Returns the token used to identify the type with the specified name.
Public method GetTypeToken(Type) Returns the token used to identify the specified type within this module.
Public method IsDefined Returns a value that indicates whether the specified attribute type has been applied to this module. (Overrides Module.IsDefined(Type, Boolean).)
Public method IsResource Gets a value indicating whether the object is a resource. (Overrides Module.IsResource().)
Public method IsTransient Returns a value that indicates whether this dynamic module is transient.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ResolveField(Int32) Returns the field identified by the specified metadata token. (Inherited from Module.)
Public method ResolveField(Int32, Type[], Type[]) Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters. (Overrides Module.ResolveField(Int32, Type[], Type[]).)
Public method ResolveMember(Int32) Returns the type or member identified by the specified metadata token. (Inherited from Module.)
Public method ResolveMember(Int32, Type[], Type[]) Returns the type or member identified by the specified metadata token, in the context defined by the specified generic type parameters. (Overrides Module.ResolveMember(Int32, Type[], Type[]).)
Public method ResolveMethod(Int32) Returns the method or constructor identified by the specified metadata token. (Inherited from Module.)
Public method ResolveMethod(Int32, Type[], Type[]) Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters. (Overrides Module.ResolveMethod(Int32, Type[], Type[]).)
Public method ResolveSignature Returns the signature blob identified by a metadata token. (Overrides Module.ResolveSignature(Int32).)
Public method ResolveString Returns the string identified by the specified metadata token. (Overrides Module.ResolveString(Int32).)
Public method ResolveType(Int32) Returns the type identified by the specified metadata token. (Inherited from Module.)
Public method ResolveType(Int32, Type[], Type[]) Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters. (Overrides Module.ResolveType(Int32, Type[], Type[]).)
Public method SetCustomAttribute(CustomAttributeBuilder) Applies a custom attribute to this module by using a custom attribute builder.
Public method SetCustomAttribute(ConstructorInfo, Byte[]) Applies a custom attribute to this module by using a specified binary large object (BLOB) that represents the attribute.
Public method SetSymCustomAttribute This method does nothing.
Public method SetUserEntryPoint Sets the user entry point.
Public method ToString Returns the name of the module. (Inherited from Module.)
Top

  Name Description
Public Extension Method GetCustomAttribute(Type) Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified module. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttribute<T>() Overloaded. Retrieves a custom attribute of a specified type that is applied to a specified module. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes() Overloaded. Retrieves a collection of custom attributes that are applied to a specified module. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes(Type) Overloaded. Retrieves a collection of custom attributes of a specified type that are applied to a specified module. (Defined by CustomAttributeExtensions.)
Public Extension Method GetCustomAttributes<T>() Overloaded. Retrieves a collection of custom attributes of a specified type that are applied to a specified module. (Defined by CustomAttributeExtensions.)
Public Extension Method IsDefined Indicates whether custom attributes of a specified type are applied to a specified module. (Defined by CustomAttributeExtensions.)
Top

  Name Description
Explicit interface implemetation Private method _Module.GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Module.)
Explicit interface implemetation Private method _Module.GetTypeInfo Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from Module.)
Explicit interface implemetation Private method _Module.GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Module.)
Explicit interface implemetation Private method _Module.Invoke Provides access to properties and methods exposed by an object. (Inherited from Module.)
Explicit interface implemetation Private method _ModuleBuilder.GetIDsOfNames For a description of this member, see _ModuleBuilder.GetIDsOfNames.
Explicit interface implemetation Private method _ModuleBuilder.GetTypeInfo For a description of this member, see _ModuleBuilder.GetTypeInfo.
Explicit interface implemetation Private method _ModuleBuilder.GetTypeInfoCount For a description of this member, see _ModuleBuilder.GetTypeInfoCount.
Explicit interface implemetation Private method _ModuleBuilder.Invoke For a description of this member, see _ModuleBuilder.Invoke.
Top
Show:
© 2014 Microsoft