using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System.Reflection
{
/// Performs reflection on a module.
// Token: 0x02000252 RID: 594
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_Module))]
[Serializable]
public class Module : ISerializable, ICustomAttributeProvider, _Module
{
// Token: 0x06001E93 RID: 7827 RVA: 0x000711F0 File Offset: 0x0006F3F0
internal Module()
{
}
/// Maps a set of names to a corresponding set of dispatch identifiers.
/// Reserved for future use. Must be IID_NULL.
/// Passed-in array of names to be mapped.
/// Count of the names to be mapped.
/// The locale context in which to interpret the names.
/// Caller-allocated array that receives the IDs corresponding to the names.
/// Late-bound access using the COM IDispatch interface is not supported.
// Token: 0x06001E95 RID: 7829 RVA: 0x00071228 File Offset: 0x0006F428
void _Module.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException();
}
/// Retrieves the type information for an object, which can then be used to get the type information for an interface.
/// The type information to return.
/// The locale identifier for the type information.
/// Receives a pointer to the requested type information object.
/// Late-bound access using the COM IDispatch interface is not supported.
// Token: 0x06001E96 RID: 7830 RVA: 0x00071230 File Offset: 0x0006F430
void _Module.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException();
}
/// Retrieves the number of type information interfaces that an object provides (either 0 or 1).
/// Points to a location that receives the number of type information interfaces provided by the object.
/// Late-bound access using the COM IDispatch interface is not supported.
// Token: 0x06001E97 RID: 7831 RVA: 0x00071238 File Offset: 0x0006F438
void _Module.GetTypeInfoCount(out uint pcTInfo)
{
throw new NotImplementedException();
}
/// Provides access to properties and methods exposed by an object.
/// Identifies the member.
/// Reserved for future use. Must be IID_NULL.
/// The locale context in which to interpret arguments.
/// Flags describing the context of the call.
/// Pointer to a structure containing an array of arguments, an array of argument DispIDs for named arguments, and counts for the number of elements in the arrays.
/// Pointer to the location where the result is to be stored.
/// Pointer to a structure that contains exception information.
/// The index of the first argument that has an error.
/// Late-bound access using the COM IDispatch interface is not supported.
// Token: 0x06001E98 RID: 7832 RVA: 0x00071240 File Offset: 0x0006F440
void _Module.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException();
}
/// Gets the appropriate for this instance of .
/// An Assembly object.
// Token: 0x170005A7 RID: 1447
// (get) Token: 0x06001E99 RID: 7833 RVA: 0x00071248 File Offset: 0x0006F448
public Assembly Assembly
{
get
{
return this.assembly;
}
}
/// Gets a string representing the fully qualified name and path to this module.
/// The fully qualified module name.
/// The caller does not have the required permissions.
///
///
///
// Token: 0x170005A8 RID: 1448
// (get) Token: 0x06001E9A RID: 7834 RVA: 0x00071250 File Offset: 0x0006F450
public virtual string FullyQualifiedName
{
get
{
return this.fqname;
}
}
/// Gets a String representing the name of the module with the path removed.
/// The module name with no path.
///
///
///
// Token: 0x170005A9 RID: 1449
// (get) Token: 0x06001E9B RID: 7835 RVA: 0x00071258 File Offset: 0x0006F458
public string Name
{
get
{
return this.name;
}
}
/// Gets a string representing the name of the module.
/// The module name.
// Token: 0x170005AA RID: 1450
// (get) Token: 0x06001E9C RID: 7836 RVA: 0x00071260 File Offset: 0x0006F460
public string ScopeName
{
get
{
return this.scopename;
}
}
/// Gets a handle for the module.
/// A structure for the current module.
// Token: 0x170005AB RID: 1451
// (get) Token: 0x06001E9D RID: 7837 RVA: 0x00071268 File Offset: 0x0006F468
public ModuleHandle ModuleHandle
{
get
{
return new ModuleHandle(this._impl);
}
}
/// Gets a token that identifies the module in metadata.
/// An integer token that identifies the current module in metadata.
// Token: 0x170005AC RID: 1452
// (get) Token: 0x06001E9E RID: 7838
public extern int MetadataToken
{
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
/// Gets the metadata stream version.
/// 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.
// Token: 0x170005AD RID: 1453
// (get) Token: 0x06001E9F RID: 7839 RVA: 0x00071278 File Offset: 0x0006F478
public int MDStreamVersion
{
get
{
if (this._impl == IntPtr.Zero)
{
throw new NotSupportedException();
}
return Module.GetMDStreamVersion(this._impl);
}
}
// Token: 0x06001EA0 RID: 7840
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern int GetMDStreamVersion(IntPtr module_handle);
/// Returns an array of classes accepted by the given filter and filter criteria.
/// An array of type Type containing classes that were accepted by the filter.
/// The delegate used to filter the classes.
/// An Object used to filter the classes.
/// One or more classes in a module could not be loaded.
// Token: 0x06001EA1 RID: 7841 RVA: 0x000712AC File Offset: 0x0006F4AC
public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria)
{
ArrayList arrayList = new ArrayList();
Type[] types = this.GetTypes();
foreach (Type type in types)
{
if (filter(type, filterCriteria))
{
arrayList.Add(type);
}
}
return (Type[])arrayList.ToArray(typeof(Type));
}
/// Returns all custom attributes.
/// An array of type Object containing all custom attributes.
/// This argument is ignored for objects of this type.
// Token: 0x06001EA2 RID: 7842 RVA: 0x00071310 File Offset: 0x0006F510
public virtual object[] GetCustomAttributes(bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes(this, inherit);
}
/// Gets custom attributes of the specified type.
/// An array of type Object containing all custom attributes of the specified type.
/// The type of attribute to get.
/// This argument is ignored for objects of this type.
///
/// is null.
///
/// is not a object supplied by the runtime. For example, is a object.
// Token: 0x06001EA3 RID: 7843 RVA: 0x0007131C File Offset: 0x0006F51C
public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes(this, attributeType, inherit);
}
/// Returns a field having the specified name.
/// A FieldInfo object having the specified name, or null if the field does not exist.
/// The field name.
/// The parameter is null.
// Token: 0x06001EA4 RID: 7844 RVA: 0x00071328 File Offset: 0x0006F528
public FieldInfo GetField(string name)
{
if (this.IsResource())
{
return null;
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? null : globalType.GetField(name, BindingFlags.Static | BindingFlags.Public);
}
/// Returns a field having the specified name and binding attributes.
/// A FieldInfo object having the specified name and binding attributes, or null if the field does not exist.
/// The field name.
/// One of the BindingFlags bit flags used to control the search.
/// The parameter is null.
// Token: 0x06001EA5 RID: 7845 RVA: 0x00071360 File Offset: 0x0006F560
public FieldInfo GetField(string name, BindingFlags bindingAttr)
{
if (this.IsResource())
{
return null;
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? null : globalType.GetField(name, bindingAttr);
}
/// Returns the global fields defined on the module.
/// An array of objects representing the global fields defined on the module; if there are no global fields, an empty array is returned.
// Token: 0x06001EA6 RID: 7846 RVA: 0x00071398 File Offset: 0x0006F598
public FieldInfo[] GetFields()
{
if (this.IsResource())
{
return new FieldInfo[0];
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? new FieldInfo[0] : globalType.GetFields(BindingFlags.Static | BindingFlags.Public);
}
/// Returns a method having the specified name.
/// A MethodInfo object having the specified name, or null if the method does not exist.
/// The method name.
///
/// is null.
// Token: 0x06001EA7 RID: 7847 RVA: 0x000713D8 File Offset: 0x0006F5D8
public MethodInfo GetMethod(string name)
{
if (this.IsResource())
{
return null;
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? null : globalType.GetMethod(name);
}
/// Returns a method having the specified name and parameter types.
/// A MethodInfo object in accordance with the specified criteria, or null if the method does not exist.
/// The method name.
/// The parameter types to search for.
///
/// is null, is null, or (i) is null.
// Token: 0x06001EA8 RID: 7848 RVA: 0x0007140C File Offset: 0x0006F60C
public MethodInfo GetMethod(string name, Type[] types)
{
return this.GetMethodImpl(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, CallingConventions.Any, types, null);
}
/// Returns a method having the specified name, binding information, calling convention, and parameter types and modifiers.
/// A MethodInfo object in accordance with the specified criteria, or null if the method does not exist.
/// The method name.
/// One of the BindingFlags bit flags used to control the search.
/// An object that implements Binder, containing properties related to this method.
/// The calling convention for the method.
/// The parameter types to search for.
/// An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.
///
/// is null, is null, or (i) is null.
// Token: 0x06001EA9 RID: 7849 RVA: 0x0007141C File Offset: 0x0006F61C
public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
return this.GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers);
}
/// Returns the method implementation in accordance with the specified criteria.
/// A MethodInfo object containing implementation information as specified, or null if the method does not exist.
/// The method name.
/// One of the BindingFlags bit flags used to control the search.
/// An object that implements Binder, containing properties related to this method.
/// The calling convention for the method.
/// The parameter types to search for.
/// An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.
///
/// is null.
// Token: 0x06001EAA RID: 7850 RVA: 0x00071430 File Offset: 0x0006F630
protected virtual MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
if (this.IsResource())
{
return null;
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? null : globalType.GetMethod(name, bindingAttr, binder, callConvention, types, modifiers);
}
/// Returns the global methods defined on the module.
/// An array of objects representing all the global methods defined on the module; if there are no global methods, an empty array is returned.
// Token: 0x06001EAB RID: 7851 RVA: 0x0007146C File Offset: 0x0006F66C
public MethodInfo[] GetMethods()
{
if (this.IsResource())
{
return new MethodInfo[0];
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? new MethodInfo[0] : globalType.GetMethods();
}
/// Returns the global methods defined on the module that match the specified binding flags.
/// An array of type 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.
/// A bitwise combination of values that limit the search.
// Token: 0x06001EAC RID: 7852 RVA: 0x000714AC File Offset: 0x0006F6AC
public MethodInfo[] GetMethods(BindingFlags bindingFlags)
{
if (this.IsResource())
{
return new MethodInfo[0];
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? new MethodInfo[0] : globalType.GetMethods(bindingFlags);
}
/// Returns the global fields defined on the module that match the specified binding flags.
/// An array of type 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.
/// A bitwise combination of values that limit the search.
// Token: 0x06001EAD RID: 7853 RVA: 0x000714EC File Offset: 0x0006F6EC
public FieldInfo[] GetFields(BindingFlags bindingFlags)
{
if (this.IsResource())
{
return new FieldInfo[0];
}
Type globalType = this.GetGlobalType();
return (globalType == null) ? new FieldInfo[0] : globalType.GetFields(bindingFlags);
}
/// Provides an implementation for serialized objects.
/// The information and data needed to serialize or deserialize an object.
/// The context for the serialization.
///
/// is null.
///
///
///
// Token: 0x06001EAE RID: 7854 RVA: 0x0007152C File Offset: 0x0006F72C
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
UnitySerializationHolder.GetModuleData(this, info, context);
}
/// Returns the specified type, performing a case-sensitive search.
/// A Type object representing the given type, if the type is in this module; otherwise, null.
/// The name of the type to locate. The name must be fully qualified with the namespace.
///
/// is null.
/// The class initializers are invoked and an exception is thrown.
///
/// is a zero-length string.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001EAF RID: 7855 RVA: 0x00071548 File Offset: 0x0006F748
[ComVisible(true)]
public virtual Type GetType(string className)
{
return this.GetType(className, false, false);
}
/// Returns the specified type, searching the module with the specified case sensitivity.
/// A Type object representing the given type, if the type is in this module; otherwise, null.
/// The name of the type to locate. The name must be fully qualified with the namespace.
/// true for case-insensitive search; otherwise, false.
///
/// is null.
/// The class initializers are invoked and an exception is thrown.
///
/// is a zero-length string.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001EB0 RID: 7856 RVA: 0x00071554 File Offset: 0x0006F754
[ComVisible(true)]
public virtual Type GetType(string className, bool ignoreCase)
{
return this.GetType(className, false, ignoreCase);
}
/// 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.
/// A object representing the specified type, if the type is declared in this module; otherwise, null.
/// The name of the type to locate. The name must be fully qualified with the namespace.
/// true to throw an exception if the type cannot be found; false to return null.
/// true for case-insensitive search; otherwise, false.
///
/// is null.
/// The class initializers are invoked and an exception is thrown.
///
/// is a zero-length string.
///
/// is true, and the type cannot be found.
///
/// requires a dependent assembly that could not be found.
///
/// requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded.
///
/// requires a dependent assembly, but the file is not a valid assembly. -or- requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
// Token: 0x06001EB1 RID: 7857 RVA: 0x00071560 File Offset: 0x0006F760
[ComVisible(true)]
public virtual Type GetType(string className, bool throwOnError, bool ignoreCase)
{
if (className == null)
{
throw new ArgumentNullException("className");
}
if (className == string.Empty)
{
throw new ArgumentException("Type name can't be empty");
}
return this.assembly.InternalGetType(this, className, throwOnError, ignoreCase);
}
// Token: 0x06001EB2 RID: 7858
[MethodImpl(MethodImplOptions.InternalCall)]
private extern Type[] InternalGetTypes();
/// Returns all the types defined within this module.
/// An array of type Type containing types defined within the module that is reflected by this instance.
/// One or more classes in a module could not be loaded.
/// The caller does not have the required permission.
// Token: 0x06001EB3 RID: 7859 RVA: 0x000715A0 File Offset: 0x0006F7A0
public virtual Type[] GetTypes()
{
return this.InternalGetTypes();
}
/// Determines if the specified is defined on this module.
/// true if one or more instance of is defined on this module; otherwise, false.
/// The Type object to which the custom attribute is applied.
/// This argument is ignored for objects of this type.
///
/// is null.
///
/// is not a object supplied by the runtime. For example, is a object.
// Token: 0x06001EB4 RID: 7860 RVA: 0x000715A8 File Offset: 0x0006F7A8
public virtual bool IsDefined(Type attributeType, bool inherit)
{
return MonoCustomAttrs.IsDefined(this, attributeType, inherit);
}
/// Gets a value indicating whether the object is a resource.
/// true if the object is a resource; otherwise, false.
// Token: 0x06001EB5 RID: 7861 RVA: 0x000715B4 File Offset: 0x0006F7B4
public bool IsResource()
{
return this.is_resource;
}
/// Returns the name of the module.
/// A String representing the name of this module.
// Token: 0x06001EB6 RID: 7862 RVA: 0x000715BC File Offset: 0x0006F7BC
public override string ToString()
{
return this.name;
}
// Token: 0x170005AE RID: 1454
// (get) Token: 0x06001EB7 RID: 7863 RVA: 0x000715C4 File Offset: 0x0006F7C4
internal Guid MvId
{
get
{
return this.GetModuleVersionId();
}
}
/// Gets a universally unique identifier (UUID) that can be used to distinguish between two versions of a module.
/// A that can be used to distinguish between two versions of a module.
// Token: 0x170005AF RID: 1455
// (get) Token: 0x06001EB8 RID: 7864 RVA: 0x000715CC File Offset: 0x0006F7CC
public Guid ModuleVersionId
{
get
{
return this.GetModuleVersionId();
}
}
/// Gets a pair of values indicating the nature of the code in a module and the platform targeted by the module.
/// When this method returns, a combination of the values indicating the nature of the code in the module.
/// When this method returns, one of the values indicating the platform targeted by the module.
// Token: 0x06001EB9 RID: 7865 RVA: 0x000715D4 File Offset: 0x0006F7D4
public void GetPEKind(out PortableExecutableKinds peKind, out ImageFileMachine machine)
{
this.ModuleHandle.GetPEKind(out peKind, out machine);
}
// Token: 0x06001EBA RID: 7866 RVA: 0x000715F4 File Offset: 0x0006F7F4
private Exception resolve_token_exception(int metadataToken, ResolveTokenError error, string tokenType)
{
if (error == ResolveTokenError.OutOfRange)
{
return new ArgumentOutOfRangeException("metadataToken", string.Format("Token 0x{0:x} is not valid in the scope of module {1}", metadataToken, this.name));
}
return new ArgumentException(string.Format("Token 0x{0:x} is not a valid {1} token in the scope of module {2}", metadataToken, tokenType, this.name), "metadataToken");
}
// Token: 0x06001EBB RID: 7867 RVA: 0x0007164C File Offset: 0x0006F84C
private IntPtr[] ptrs_from_types(Type[] types)
{
if (types == null)
{
return null;
}
IntPtr[] array = new IntPtr[types.Length];
for (int i = 0; i < types.Length; i++)
{
if (types[i] == null)
{
throw new ArgumentException();
}
array[i] = types[i].TypeHandle.Value;
}
return array;
}
/// Returns the field identified by the specified metadata token.
/// A object representing the field that is identified by the specified metadata token.
/// A metadata token that identifies a field in the module.
///
/// is not a token for a field in the scope of the current module.-or- identifies a field whose parent TypeSpec has a signature containing element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method).
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EBC RID: 7868 RVA: 0x000716AC File Offset: 0x0006F8AC
public FieldInfo ResolveField(int metadataToken)
{
return this.ResolveField(metadataToken, null, null);
}
/// Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters.
/// A object representing the field that is identified by the specified metadata token.
/// A metadata token that identifies a field in the module.
/// An array of objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.
/// An array of objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.
///
/// is not a token for a field in the scope of the current module.-or- identifies a field whose parent TypeSpec has a signature containing element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method), and the necessary generic type arguments were not supplied for either or both of and .
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EBD RID: 7869 RVA: 0x000716B8 File Offset: 0x0006F8B8
public FieldInfo ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
{
ResolveTokenError resolveTokenError;
IntPtr intPtr = Module.ResolveFieldToken(this._impl, metadataToken, this.ptrs_from_types(genericTypeArguments), this.ptrs_from_types(genericMethodArguments), out resolveTokenError);
if (intPtr == IntPtr.Zero)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "Field");
}
return FieldInfo.GetFieldFromHandle(new RuntimeFieldHandle(intPtr));
}
/// Returns the type or member identified by the specified metadata token.
/// A object representing the type or member that is identified by the specified metadata token.
/// A metadata token that identifies a type or member in the module.
///
/// is not a token for a type or member in the scope of the current module.-or- is a MethodSpec or TypeSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method).-or- identifies a property or event.
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EBE RID: 7870 RVA: 0x0007170C File Offset: 0x0006F90C
public MemberInfo ResolveMember(int metadataToken)
{
return this.ResolveMember(metadataToken, null, null);
}
/// Returns the type or member identified by the specified metadata token, in the context defined by the specified generic type parameters.
/// A object representing the type or member that is identified by the specified metadata token.
/// A metadata token that identifies a type or member in the module.
/// An array of objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.
/// An array of objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.
///
/// is not a token for a type or member in the scope of the current module.-or- is a MethodSpec or TypeSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method), and the necessary generic type arguments were not supplied for either or both of and .-or- identifies a property or event.
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EBF RID: 7871 RVA: 0x00071718 File Offset: 0x0006F918
public MemberInfo ResolveMember(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
{
ResolveTokenError resolveTokenError;
MemberInfo memberInfo = Module.ResolveMemberToken(this._impl, metadataToken, this.ptrs_from_types(genericTypeArguments), this.ptrs_from_types(genericMethodArguments), out resolveTokenError);
if (memberInfo == null)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "MemberInfo");
}
return memberInfo;
}
/// Returns the method or constructor identified by the specified metadata token.
/// A object representing the method or constructor that is identified by the specified metadata token.
/// A metadata token that identifies a method or constructor in the module.
///
/// is not a token for a method or constructor in the scope of the current module.-or- is a MethodSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method).
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC0 RID: 7872 RVA: 0x00071758 File Offset: 0x0006F958
public MethodBase ResolveMethod(int metadataToken)
{
return this.ResolveMethod(metadataToken, null, null);
}
/// Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters.
/// A object representing the method that is identified by the specified metadata token.
/// A metadata token that identifies a method or constructor in the module.
/// An array of objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.
/// An array of objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.
///
/// is not a token for a method or constructor in the scope of the current module.-or- is a MethodSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method), and the necessary generic type arguments were not supplied for either or both of and .
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC1 RID: 7873 RVA: 0x00071764 File Offset: 0x0006F964
public MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
{
ResolveTokenError resolveTokenError;
IntPtr intPtr = Module.ResolveMethodToken(this._impl, metadataToken, this.ptrs_from_types(genericTypeArguments), this.ptrs_from_types(genericMethodArguments), out resolveTokenError);
if (intPtr == IntPtr.Zero)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "MethodBase");
}
return MethodBase.GetMethodFromHandleNoGenericCheck(new RuntimeMethodHandle(intPtr));
}
/// Returns the string identified by the specified metadata token.
/// A containing a string value from the metadata string heap.
/// A metadata token that identifies a string in the string heap of the module.
///
/// is not a token for a string in the scope of the current module.
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC2 RID: 7874 RVA: 0x000717B8 File Offset: 0x0006F9B8
public string ResolveString(int metadataToken)
{
ResolveTokenError resolveTokenError;
string text = Module.ResolveStringToken(this._impl, metadataToken, out resolveTokenError);
if (text == null)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "string");
}
return text;
}
/// Returns the type identified by the specified metadata token.
/// A object representing the type that is identified by the specified metadata token.
/// A metadata token that identifies a type in the module.
///
/// is not a token for a type in the scope of the current module.-or- is a TypeSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method).
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC3 RID: 7875 RVA: 0x000717EC File Offset: 0x0006F9EC
public Type ResolveType(int metadataToken)
{
return this.ResolveType(metadataToken, null, null);
}
/// Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.
/// A object representing the type that is identified by the specified metadata token.
/// A metadata token that identifies a type in the module.
/// An array of objects representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.
/// An array of objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.
///
/// is not a token for a type in the scope of the current module.-or- is a TypeSpec whose signature contains element type var (a type parameter of a generic type) or mvar (a type parameter of a generic method), and the necessary generic type arguments were not supplied for either or both of and .
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC4 RID: 7876 RVA: 0x000717F8 File Offset: 0x0006F9F8
public Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
{
ResolveTokenError resolveTokenError;
IntPtr intPtr = Module.ResolveTypeToken(this._impl, metadataToken, this.ptrs_from_types(genericTypeArguments), this.ptrs_from_types(genericMethodArguments), out resolveTokenError);
if (intPtr == IntPtr.Zero)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "Type");
}
return Type.GetTypeFromHandle(new RuntimeTypeHandle(intPtr));
}
/// Returns the signature blob identified by a metadata token.
/// An array of bytes representing the signature blob.
/// A metadata token that identifies a signature in the module.
///
/// is not a valid MemberRef, MethodDef, TypeSpec, signature, or FieldDef token in the scope of the current module.
///
/// is not a valid token in the scope of the current module.
// Token: 0x06001EC5 RID: 7877 RVA: 0x0007184C File Offset: 0x0006FA4C
public byte[] ResolveSignature(int metadataToken)
{
ResolveTokenError resolveTokenError;
byte[] array = Module.ResolveSignature(this._impl, metadataToken, out resolveTokenError);
if (array == null)
{
throw this.resolve_token_exception(metadataToken, resolveTokenError, "signature");
}
return array;
}
// Token: 0x06001EC6 RID: 7878 RVA: 0x00071880 File Offset: 0x0006FA80
internal static Type MonoDebugger_ResolveType(Module module, int token)
{
ResolveTokenError resolveTokenError;
IntPtr intPtr = Module.ResolveTypeToken(module._impl, token, null, null, out resolveTokenError);
if (intPtr == IntPtr.Zero)
{
return null;
}
return Type.GetTypeFromHandle(new RuntimeTypeHandle(intPtr));
}
// Token: 0x06001EC7 RID: 7879 RVA: 0x000718BC File Offset: 0x0006FABC
internal static Guid Mono_GetGuid(Module module)
{
return module.GetModuleVersionId();
}
// Token: 0x06001EC8 RID: 7880 RVA: 0x000718C4 File Offset: 0x0006FAC4
internal virtual Guid GetModuleVersionId()
{
return new Guid(this.GetGuidInternal());
}
// Token: 0x06001EC9 RID: 7881 RVA: 0x000718D4 File Offset: 0x0006FAD4
private static bool filter_by_type_name(Type m, object filterCriteria)
{
string text = (string)filterCriteria;
if (text.EndsWith("*"))
{
return m.Name.StartsWith(text.Substring(0, text.Length - 1));
}
return m.Name == text;
}
// Token: 0x06001ECA RID: 7882 RVA: 0x00071920 File Offset: 0x0006FB20
private static bool filter_by_type_name_ignore_case(Type m, object filterCriteria)
{
string text = (string)filterCriteria;
if (text.EndsWith("*"))
{
return m.Name.ToLower().StartsWith(text.Substring(0, text.Length - 1).ToLower());
}
return string.Compare(m.Name, text, true) == 0;
}
// Token: 0x06001ECB RID: 7883
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern IntPtr GetHINSTANCE();
// Token: 0x06001ECC RID: 7884
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string GetGuidInternal();
// Token: 0x06001ECD RID: 7885
[MethodImpl(MethodImplOptions.InternalCall)]
private extern Type GetGlobalType();
// Token: 0x06001ECE RID: 7886
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern IntPtr ResolveTypeToken(IntPtr module, int token, IntPtr[] type_args, IntPtr[] method_args, out ResolveTokenError error);
// Token: 0x06001ECF RID: 7887
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern IntPtr ResolveMethodToken(IntPtr module, int token, IntPtr[] type_args, IntPtr[] method_args, out ResolveTokenError error);
// Token: 0x06001ED0 RID: 7888
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern IntPtr ResolveFieldToken(IntPtr module, int token, IntPtr[] type_args, IntPtr[] method_args, out ResolveTokenError error);
// Token: 0x06001ED1 RID: 7889
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern string ResolveStringToken(IntPtr module, int token, out ResolveTokenError error);
// Token: 0x06001ED2 RID: 7890
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern MemberInfo ResolveMemberToken(IntPtr module, int token, IntPtr[] type_args, IntPtr[] method_args, out ResolveTokenError error);
// Token: 0x06001ED3 RID: 7891
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern byte[] ResolveSignature(IntPtr module, int metadataToken, out ResolveTokenError error);
// Token: 0x06001ED4 RID: 7892
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void GetPEKind(IntPtr module, out PortableExecutableKinds peKind, out ImageFileMachine machine);
// Token: 0x04000AA8 RID: 2728
private const BindingFlags defaultBindingFlags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public;
/// A TypeFilter object that filters the list of types defined in this module based upon the name. This field is case-sensitive and read-only.
// Token: 0x04000AA9 RID: 2729
public static readonly TypeFilter FilterTypeName = new TypeFilter(Module.filter_by_type_name);
/// A TypeFilter object that filters the list of types defined in this module based upon the name. This field is case-insensitive and read-only.
// Token: 0x04000AAA RID: 2730
public static readonly TypeFilter FilterTypeNameIgnoreCase = new TypeFilter(Module.filter_by_type_name_ignore_case);
// Token: 0x04000AAB RID: 2731
private IntPtr _impl;
// Token: 0x04000AAC RID: 2732
internal Assembly assembly;
// Token: 0x04000AAD RID: 2733
internal string fqname;
// Token: 0x04000AAE RID: 2734
internal string name;
// Token: 0x04000AAF RID: 2735
internal string scopename;
// Token: 0x04000AB0 RID: 2736
internal bool is_resource;
// Token: 0x04000AB1 RID: 2737
internal int token;
}
}