mscorlib(4.0.0.0) API with additions
|
Represents a runtime handle for a module. More...
Public Member Functions | |
internal | ModuleHandle (RuntimeModule module) |
internal RuntimeModule | GetRuntimeModule () |
internal bool | IsNullHandle () |
override int | GetHashCode () |
Returns the hash code for this instance. More... | |
override bool | Equals (object obj) |
Returns a T:System.Boolean value indicating whether the specified object is a T:System.ModuleHandle structure, and equal to the current T:System.ModuleHandle. More... | |
bool | Equals (ModuleHandle handle) |
Returns a T:System.Boolean value indicating whether the specified T:System.ModuleHandle structure is equal to the current T:System.ModuleHandle. More... | |
static internal IRuntimeMethodInfo | GetDynamicMethod (DynamicMethod method, RuntimeModule module, string name, byte[] sig, Resolver resolver) |
static internal int | GetToken (RuntimeModule module) |
RuntimeTypeHandle | GetRuntimeTypeHandleFromMetadataToken (int typeToken) |
Returns a runtime type handle for the type identified by the specified metadata token. More... | |
RuntimeTypeHandle | ResolveTypeHandle (int typeToken) |
Returns a runtime type handle for the type identified by the specified metadata token. More... | |
RuntimeTypeHandle | ResolveTypeHandle (int typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
Returns a runtime type handle for the type identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope. More... | |
RuntimeMethodHandle | GetRuntimeMethodHandleFromMetadataToken (int methodToken) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token. More... | |
RuntimeMethodHandle | ResolveMethodHandle (int methodToken) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token. More... | |
RuntimeMethodHandle | ResolveMethodHandle (int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope. More... | |
RuntimeFieldHandle | GetRuntimeFieldHandleFromMetadataToken (int fieldToken) |
Returns a runtime handle for the field identified by the specified metadata token. More... | |
RuntimeFieldHandle | ResolveFieldHandle (int fieldToken) |
Returns a runtime handle for the field identified by the specified metadata token. More... | |
RuntimeFieldHandle | ResolveFieldHandle (int fieldToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
Returns a runtime field handle for the field identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope. More... | |
static internal void | GetModuleType (RuntimeModule handle, ObjectHandleOnStack type) |
static internal int | GetMDStreamVersion (RuntimeModule module) |
Static Public Member Functions | |
static bool | operator== (ModuleHandle left, ModuleHandle right) |
Tests whether two T:System.ModuleHandle structures are equal. More... | |
static bool | operator != (ModuleHandle left, ModuleHandle right) |
Tests whether two T:System.ModuleHandle structures are unequal. More... | |
internal static unsafe RuntimeType | ResolveTypeHandleInternal (RuntimeModule module, int typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
static internal IRuntimeMethodInfo | ResolveMethodHandleInternal (RuntimeModule module, int methodToken) |
static internal IRuntimeMethodInfo | ResolveMethodHandleInternal (RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
internal static unsafe RuntimeMethodHandleInternal | ResolveMethodHandleInternalCore (RuntimeModule module, int methodToken, IntPtr[] typeInstantiationContext, int typeInstCount, IntPtr[] methodInstantiationContext, int methodInstCount) |
internal static unsafe IRuntimeFieldInfo | ResolveFieldHandleInternal (RuntimeModule module, int fieldToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) |
static internal bool | ContainsPropertyMatchingHash (RuntimeModule module, int propertyToken, uint hash) |
static internal RuntimeAssembly | GetAssembly (RuntimeModule module) |
static internal RuntimeType | GetModuleType (RuntimeModule module) |
static internal void | GetPEKind (RuntimeModule module, out PortableExecutableKinds peKind, out ImageFileMachine machine) |
static internal MetadataImport | GetMetadataImport (RuntimeModule module) |
Static Public Attributes | |
static readonly ModuleHandle | EmptyHandle = GetEmptyMH() |
Represents an empty module handle. More... | |
Properties | |
int | MDStreamVersion [get] |
Gets the metadata stream version. More... | |
Represents a runtime handle for a module.
Definition at line 12 of file ModuleHandle.cs.
override bool System.ModuleHandle.Equals | ( | object | obj | ) |
Returns a T:System.Boolean value indicating whether the specified object is a T:System.ModuleHandle structure, and equal to the current T:System.ModuleHandle.
obj | The object to be compared with the current T:System.ModuleHandle structure. |
true
if obj is a T:System.ModuleHandle structure, and is equal to the current T:System.ModuleHandle structure; otherwise, false
.Definition at line 66 of file ModuleHandle.cs.
bool System.ModuleHandle.Equals | ( | ModuleHandle | handle | ) |
Returns a T:System.Boolean value indicating whether the specified T:System.ModuleHandle structure is equal to the current T:System.ModuleHandle.
handle | The T:System.ModuleHandle structure to be compared with the current T:System.ModuleHandle. |
true
if handle is equal to the current T:System.ModuleHandle structure; otherwise false
.Definition at line 81 of file ModuleHandle.cs.
override int System.ModuleHandle.GetHashCode | ( | ) |
Returns the hash code for this instance.
Definition at line 52 of file ModuleHandle.cs.
RuntimeFieldHandle System.ModuleHandle.GetRuntimeFieldHandleFromMetadataToken | ( | int | fieldToken | ) |
Returns a runtime handle for the field identified by the specified metadata token.
fieldToken | A metadata token that identifies a field in the module. |
Definition at line 274 of file ModuleHandle.cs.
RuntimeMethodHandle System.ModuleHandle.GetRuntimeMethodHandleFromMetadataToken | ( | int | methodToken | ) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token.
methodToken | A metadata token that identifies a method or constructor in the module. |
Definition at line 195 of file ModuleHandle.cs.
RuntimeTypeHandle System.ModuleHandle.GetRuntimeTypeHandleFromMetadataToken | ( | int | typeToken | ) |
Returns a runtime type handle for the type identified by the specified metadata token.
typeToken | A metadata token that identifies a type in the module. |
Definition at line 125 of file ModuleHandle.cs.
|
static |
Tests whether two T:System.ModuleHandle structures are unequal.
left | The T:System.ModuleHandle structure to the left of the inequality operator. |
right | The T:System.ModuleHandle structure to the right of the inequality operator. |
true
if the T:System.ModuleHandle structures are unequal; otherwise, false
.Definition at line 101 of file ModuleHandle.cs.
|
static |
Tests whether two T:System.ModuleHandle structures are equal.
left | The T:System.ModuleHandle structure to the left of the equality operator. |
right | The T:System.ModuleHandle structure to the right of the equality operator. |
true
if the T:System.ModuleHandle structures are equal; otherwise, false
.Definition at line 91 of file ModuleHandle.cs.
RuntimeFieldHandle System.ModuleHandle.ResolveFieldHandle | ( | int | fieldToken | ) |
Returns a runtime handle for the field identified by the specified metadata token.
fieldToken | A metadata token that identifies a field in the module. |
T:System.BadImageFormatException | metadataToken is not a valid token in the scope of the current module.-or- metadataToken is not a token for a field in the scope of the current module.-or- metadataToken identifies a field whose parent TypeSpec has a signature containing element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty field handle. |
Definition at line 287 of file ModuleHandle.cs.
RuntimeFieldHandle System.ModuleHandle.ResolveFieldHandle | ( | int | fieldToken, |
RuntimeTypeHandle [] | typeInstantiationContext, | ||
RuntimeTypeHandle [] | methodInstantiationContext | ||
) |
Returns a runtime field handle for the field identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope.
fieldToken | A metadata token that identifies a field in the module. |
typeInstantiationContext | An array of T:System.RuntimeTypeHandle structures representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
methodInstantiationContext | An array of T:System.RuntimeTypeHandle structures representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
T:System.BadImageFormatException | metadataToken is not a valid token in the scope of the current module.-or- metadataToken is not a token for a field in the scope of the current module.-or- metadataToken identifies a field whose parent TypeSpec has a signature containing element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty field handle. |
T:System.ArgumentOutOfRangeException | fieldToken is not a valid token. |
Definition at line 304 of file ModuleHandle.cs.
RuntimeMethodHandle System.ModuleHandle.ResolveMethodHandle | ( | int | methodToken | ) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token.
methodToken | A metadata token that identifies a method or constructor in the module. |
T:System.BadImageFormatException | methodToken is not a valid metadata token for a method in the current module.-or- metadataToken is not a token for a method or constructor in the scope of the current module.-or- metadataToken is a MethodSpec whose signature contains element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty method handle. |
Definition at line 208 of file ModuleHandle.cs.
RuntimeMethodHandle System.ModuleHandle.ResolveMethodHandle | ( | int | methodToken, |
RuntimeTypeHandle [] | typeInstantiationContext, | ||
RuntimeTypeHandle [] | methodInstantiationContext | ||
) |
Returns a runtime method handle for the method or constructor identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope.
methodToken | A metadata token that identifies a method or constructor in the module. |
typeInstantiationContext | An array of T:System.RuntimeTypeHandle structures representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
methodInstantiationContext | An array of T:System.RuntimeTypeHandle structures representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
T:System.BadImageFormatException | methodToken is not a valid metadata token for a method in the current module.-or- metadataToken is not a token for a method or constructor in the scope of the current module.-or- metadataToken is a MethodSpec whose signature contains element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty method handle. |
T:System.ArgumentOutOfRangeException | methodToken is not a valid token. |
Definition at line 230 of file ModuleHandle.cs.
RuntimeTypeHandle System.ModuleHandle.ResolveTypeHandle | ( | int | typeToken | ) |
Returns a runtime type handle for the type identified by the specified metadata token.
typeToken | A metadata token that identifies a type in the module. |
T:System.BadImageFormatException | typeToken is not a valid metadata token for a type in the current module.-or- metadataToken is not a token for a type in the scope of the current module.-or- metadataToken is a TypeSpec whose signature contains element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty type handle. |
Definition at line 138 of file ModuleHandle.cs.
RuntimeTypeHandle System.ModuleHandle.ResolveTypeHandle | ( | int | typeToken, |
RuntimeTypeHandle [] | typeInstantiationContext, | ||
RuntimeTypeHandle [] | methodInstantiationContext | ||
) |
Returns a runtime type handle for the type identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope.
typeToken | A metadata token that identifies a type in the module. |
typeInstantiationContext | An array of T:System.RuntimeTypeHandle structures representing the generic type arguments of the type where the token is in scope, or null if that type is not generic. |
methodInstantiationContext | An array of T:System.RuntimeTypeHandle structures objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic. |
T:System.BadImageFormatException | typeToken is not a valid metadata token for a type in the current module.-or- metadataToken is not a token for a type in the scope of the current module.-or- metadataToken is a TypeSpec whose signature contains element type var or mvar . |
T:System.InvalidOperationException | The method is called on an empty type handle. |
T:System.ArgumentOutOfRangeException | typeToken is not a valid token. |
Definition at line 155 of file ModuleHandle.cs.
|
static |
Represents an empty module handle.
Definition at line 15 of file ModuleHandle.cs.
|
get |
Gets the metadata stream version.
Definition at line 22 of file ModuleHandle.cs.