Interface IModuleIntrospectionProvider
Interface representing a reflection provider used to introspect System.Reflection.Module objects.
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface IModuleIntrospectionProvider
  Methods
FindTypes(Module, TypeFilter, Object)
Returns an array of classes accepted by the given filter and filter criteria.
Declaration
IReadOnlyList<Type> FindTypes(Module module, TypeFilter filter, object filterCriteria)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to find types in.  | 
      
| System.Reflection.TypeFilter | filter | The delegate used to filter the classes.  | 
      
| System.Object | filterCriteria | An Object used to filter the classes.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing classes that were accepted by the filter.  | 
      
GetAssembly(Module)
Gets the appropriate System.Reflection.Assembly for the specified module.
Declaration
Assembly GetAssembly(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the assembly for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.Assembly | An System.Reflection.Assembly object.  | 
      
GetCustomAttributes(Module, Boolean)
Gets all the custom attributes for the specified module.
Declaration
IReadOnlyList<object> GetCustomAttributes(Module module, bool inherit)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get custom attributes for.  | 
      
| System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified   | 
      
GetCustomAttributes(Module, Type, Boolean)
Gets the custom attributes for the specified module as specified by type.
Declaration
IReadOnlyList<object> GetCustomAttributes(Module module, Type attributeType, bool inherit)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get custom attributes for.  | 
      
| System.Type | attributeType | The type for which the custom attributes are to be returned.  | 
      
| System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified   | 
      
GetCustomAttributesData(Module)
Returns information about the attributes that have been applied to the specified module, expressed as System.Reflection.CustomAttributeData objects.
Declaration
IEnumerable<CustomAttributeData> GetCustomAttributesData(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get custom attributes data for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | A generic list of System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the specified   | 
      
GetField(Module, String, BindingFlags)
Returns a field having the specified name and binding attributes.
Declaration
FieldInfo GetField(Module module, string name, BindingFlags bindingAttr)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
| System.String | name | The field name.  | 
      
| System.Reflection.BindingFlags | bindingAttr | One of the System.Reflection.BindingFlags bit flags used to control the search.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.FieldInfo | A System.Reflection.FieldInfo object having the specified name and binding attributes, or null if the field does not exist.  | 
      
GetFields(Module, BindingFlags)
Returns the global fields defined on the module that match the specified binding flags.
Declaration
IReadOnlyList<FieldInfo> GetFields(Module module, BindingFlags bindingFlags)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
| System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of type System.Reflection.FieldInfo representing the global fields defined on the module that match the specified binding flags; if no global fields match the binding flags, an empty array is returned.  | 
      
GetFullyQualifiedName(Module)
Gets a string representing the fully qualified name and path to the specified module.
Declaration
string GetFullyQualifiedName(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the fully qualified name for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | The fully qualified module name.  | 
      
GetMDStreamVersion(Module)
Gets the metadata stream version.
Declaration
int GetMDStreamVersion(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the stream version for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A 32-bit integer representing the metadata stream version. The high-order two bytes represent the major version number, and the low-order two bytes represent the minor version number.  | 
      
GetMetadataToken(Module)
Gets a token that identifies the module in metadata.
Declaration
int GetMetadataToken(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the metadata token for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | An integer token that identifies the current module in metadata.  | 
      
GetMethod(Module, String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Returns the method implementation in accordance with the specified criteria.
Declaration
MethodInfo GetMethod(Module module, string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
| System.String | name | The method name.  | 
      
| System.Reflection.BindingFlags | bindingAttr | One of the BindingFlags bit flags used to control the search.  | 
      
| System.Reflection.Binder | binder | An object that implements Binder, containing properties related to this method.  | 
      
| System.Reflection.CallingConventions | callConvention | The calling convention for the method.  | 
      
| System.Type[] | types | The parameter types to search for.  | 
      
| System.Reflection.ParameterModifier[] | modifiers | An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.MethodInfo | A System.Reflection.MethodInfo object containing implementation information as specified, or null if the method does not exist.  | 
      
GetMethods(Module, BindingFlags)
Returns the global methods defined on the module that match the specified binding flags.
Declaration
IReadOnlyList<MethodInfo> GetMethods(Module module, BindingFlags bindingFlags)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
| System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of type System.Reflection.MethodInfo representing the global methods defined on the module that match the specified binding flags; if no global methods match the binding flags, an empty array is returned.  | 
      
GetModuleHandle(Module)
Gets a handle for the module.
Declaration
ModuleHandle GetModuleHandle(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the module handle for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.ModuleHandle | A System.ModuleHandle structure for the current module.  | 
      
GetModuleVersionId(Module)
Gets a universally unique identifier (UUID) that can be used to distinguish between two versions of a module.
Declaration
Guid GetModuleVersionId(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the module version for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Guid | A System.Guid that can be used to distinguish between two versions of a module.  | 
      
GetName(Module)
Gets a String representing the name of the module with the path removed.
Declaration
string GetName(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the name for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | The module name with no path.  | 
      
GetPEKind(Module, out PortableExecutableKinds, out ImageFileMachine)
Gets a pair of values indicating the nature of the code in a module and the platform targeted by the module.
Declaration
void GetPEKind(Module module, out PortableExecutableKinds peKind, out ImageFileMachine machine)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the PE kind for.  | 
      
| System.Reflection.PortableExecutableKinds | peKind | When this method returns, a combination of the System.Reflection.PortableExecutableKinds values indicating the nature of the code in the module.  | 
      
| System.Reflection.ImageFileMachine | machine | When this method returns, one of the System.Reflection.ImageFileMachine values indicating the platform targeted by the module.  | 
      
GetScopeName(Module)
Gets a string representing the name of the module.
Declaration
string GetScopeName(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to get the name for.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | The module name.  | 
      
GetType(Module, String, Boolean, Boolean)
Returns the specified type, specifying whether to make a case-sensitive search of the module and whether to throw an exception if the type cannot be found.
Declaration
Type GetType(Module module, string className, bool throwOnError, bool ignoreCase)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
| System.String | className | The name of the type to locate. The name must be fully qualified with the namespace.  | 
      
| System.Boolean | throwOnError | true to throw an exception if the type cannot be found; false to return null.  | 
      
| System.Boolean | ignoreCase | true for case-insensitive search; otherwise, false.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Type | A System.Type object representing the specified type, if the type is declared in this module; otherwise, null.  | 
      
GetTypes(Module)
Returns all the types defined within the specified module.
Declaration
IReadOnlyList<Type> GetTypes(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to search in.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing types defined within the module that is reflected by this instance.  | 
      
IsDefined(Module, Type, Boolean)
Determines whether the custom attribute of the specified attributeType type or its derived types is applied to the specified module.
Declaration
bool IsDefined(Module module, Type attributeType, bool inherit)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to check the custom attribute on.  | 
      
| System.Type | attributeType | The type of attribute to search for.  | 
      
| System.Boolean | inherit | This argument is ignored for objects of this type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if one or more instances of   | 
      
IsResource(Module)
Gets a value indicating whether the object is a resource.
Declaration
bool IsResource(Module module)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to check.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the object is a resource; otherwise, false.  | 
      
ResolveField(Module, Int32, Type[], Type[])
Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
FieldInfo ResolveField(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a field in the module.  | 
      
| System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.  | 
      
| System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.FieldInfo | A System.Reflection.FieldInfo object representing the field that is identified by the specified metadata token.  | 
      
ResolveMember(Module, Int32, Type[], Type[])
Returns the type or member identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
MemberInfo ResolveMember(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a type or member in the module.  | 
      
| System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.  | 
      
| System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.MemberInfo | A System.Reflection.MemberInfo object representing the type or member that is identified by the specified metadata token.  | 
      
ResolveMethod(Module, Int32, Type[], Type[])
Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
MethodBase ResolveMethod(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a method or constructor in the module.  | 
      
| System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.  | 
      
| System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Reflection.MethodBase | A System.Reflection.MethodBase object representing the method that is identified by the specified metadata token.  | 
      
ResolveSignature(Module, Int32)
Returns the signature blob identified by a metadata token.
Declaration
byte[] ResolveSignature(Module module, int metadataToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a signature in the module.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Byte[] | An array of bytes representing the signature blob.  | 
      
ResolveString(Module, Int32)
Returns the string identified by the specified metadata token.
Declaration
string ResolveString(Module module, int metadataToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a string in the string heap of the module.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | A System.String containing a string value from the metadata string heap.  | 
      
ResolveType(Module, Int32, Type[], Type[])
Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.
Declaration
Type ResolveType(Module module, int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Reflection.Module | module | The module to resolve the metadata token in.  | 
      
| System.Int32 | metadataToken | A metadata token that identifies a type in the module.  | 
      
| System.Type[] | genericTypeArguments | An array of System.Type objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.  | 
      
| System.Type[] | genericMethodArguments | An array of System.Type objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Type | A System.Type object representing the type that is identified by the specified metadata token.  |