852 lines
49 KiB
C#
852 lines
49 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System.Reflection
|
|
{
|
|
/// <summary>Performs reflection on a module.</summary>
|
|
// 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()
|
|
{
|
|
}
|
|
|
|
/// <summary>Maps a set of names to a corresponding set of dispatch identifiers.</summary>
|
|
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
|
|
/// <param name="rgszNames">Passed-in array of names to be mapped.</param>
|
|
/// <param name="cNames">Count of the names to be mapped.</param>
|
|
/// <param name="lcid">The locale context in which to interpret the names.</param>
|
|
/// <param name="rgDispId">Caller-allocated array that receives the IDs corresponding to the names.</param>
|
|
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Retrieves the type information for an object, which can then be used to get the type information for an interface.</summary>
|
|
/// <param name="iTInfo">The type information to return.</param>
|
|
/// <param name="lcid">The locale identifier for the type information.</param>
|
|
/// <param name="ppTInfo">Receives a pointer to the requested type information object.</param>
|
|
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
|
|
// Token: 0x06001E96 RID: 7830 RVA: 0x00071230 File Offset: 0x0006F430
|
|
void _Module.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Retrieves the number of type information interfaces that an object provides (either 0 or 1).</summary>
|
|
/// <param name="pcTInfo">Points to a location that receives the number of type information interfaces provided by the object.</param>
|
|
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
|
|
// Token: 0x06001E97 RID: 7831 RVA: 0x00071238 File Offset: 0x0006F438
|
|
void _Module.GetTypeInfoCount(out uint pcTInfo)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Provides access to properties and methods exposed by an object.</summary>
|
|
/// <param name="dispIdMember">Identifies the member.</param>
|
|
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
|
|
/// <param name="lcid">The locale context in which to interpret arguments.</param>
|
|
/// <param name="wFlags">Flags describing the context of the call.</param>
|
|
/// <param name="pDispParams">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.</param>
|
|
/// <param name="pVarResult">Pointer to the location where the result is to be stored.</param>
|
|
/// <param name="pExcepInfo">Pointer to a structure that contains exception information.</param>
|
|
/// <param name="puArgErr">The index of the first argument that has an error.</param>
|
|
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Gets the appropriate <see cref="T:System.Reflection.Assembly" /> for this instance of <see cref="T:System.Reflection.Module" />.</summary>
|
|
/// <returns>An Assembly object.</returns>
|
|
// Token: 0x170005A7 RID: 1447
|
|
// (get) Token: 0x06001E99 RID: 7833 RVA: 0x00071248 File Offset: 0x0006F448
|
|
public Assembly Assembly
|
|
{
|
|
get
|
|
{
|
|
return this.assembly;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a string representing the fully qualified name and path to this module.</summary>
|
|
/// <returns>The fully qualified module name.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permissions. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
|
/// </PermissionSet>
|
|
// Token: 0x170005A8 RID: 1448
|
|
// (get) Token: 0x06001E9A RID: 7834 RVA: 0x00071250 File Offset: 0x0006F450
|
|
public virtual string FullyQualifiedName
|
|
{
|
|
get
|
|
{
|
|
return this.fqname;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a String representing the name of the module with the path removed.</summary>
|
|
/// <returns>The module name with no path.</returns>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
|
/// </PermissionSet>
|
|
// Token: 0x170005A9 RID: 1449
|
|
// (get) Token: 0x06001E9B RID: 7835 RVA: 0x00071258 File Offset: 0x0006F458
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return this.name;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a string representing the name of the module.</summary>
|
|
/// <returns>The module name.</returns>
|
|
// Token: 0x170005AA RID: 1450
|
|
// (get) Token: 0x06001E9C RID: 7836 RVA: 0x00071260 File Offset: 0x0006F460
|
|
public string ScopeName
|
|
{
|
|
get
|
|
{
|
|
return this.scopename;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a handle for the module.</summary>
|
|
/// <returns>A <see cref="T:System.ModuleHandle" /> structure for the current module.</returns>
|
|
// Token: 0x170005AB RID: 1451
|
|
// (get) Token: 0x06001E9D RID: 7837 RVA: 0x00071268 File Offset: 0x0006F468
|
|
public ModuleHandle ModuleHandle
|
|
{
|
|
get
|
|
{
|
|
return new ModuleHandle(this._impl);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a token that identifies the module in metadata.</summary>
|
|
/// <returns>An integer token that identifies the current module in metadata.</returns>
|
|
// Token: 0x170005AC RID: 1452
|
|
// (get) Token: 0x06001E9E RID: 7838
|
|
public extern int MetadataToken
|
|
{
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
|
|
/// <summary>Gets the metadata stream version.</summary>
|
|
/// <returns>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.</returns>
|
|
// 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);
|
|
|
|
/// <summary>Returns an array of classes accepted by the given filter and filter criteria.</summary>
|
|
/// <returns>An array of type Type containing classes that were accepted by the filter.</returns>
|
|
/// <param name="filter">The delegate used to filter the classes. </param>
|
|
/// <param name="filterCriteria">An Object used to filter the classes. </param>
|
|
/// <exception cref="T:System.Reflection.ReflectionTypeLoadException">One or more classes in a module could not be loaded. </exception>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Returns all custom attributes.</summary>
|
|
/// <returns>An array of type Object containing all custom attributes.</returns>
|
|
/// <param name="inherit">This argument is ignored for objects of this type. </param>
|
|
// Token: 0x06001EA2 RID: 7842 RVA: 0x00071310 File Offset: 0x0006F510
|
|
public virtual object[] GetCustomAttributes(bool inherit)
|
|
{
|
|
return MonoCustomAttrs.GetCustomAttributes(this, inherit);
|
|
}
|
|
|
|
/// <summary>Gets custom attributes of the specified type.</summary>
|
|
/// <returns>An array of type Object containing all custom attributes of the specified type.</returns>
|
|
/// <param name="attributeType">The type of attribute to get. </param>
|
|
/// <param name="inherit">This argument is ignored for objects of this type. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="attributeType" /> is null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="attributeType" /> is not a <see cref="T:System.Type" /> object supplied by the runtime. For example, <paramref name="attributeType" /> is a <see cref="T:System.Reflection.Emit.TypeBuilder" /> object.</exception>
|
|
// Token: 0x06001EA3 RID: 7843 RVA: 0x0007131C File Offset: 0x0006F51C
|
|
public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
|
|
{
|
|
return MonoCustomAttrs.GetCustomAttributes(this, attributeType, inherit);
|
|
}
|
|
|
|
/// <summary>Returns a field having the specified name.</summary>
|
|
/// <returns>A FieldInfo object having the specified name, or null if the field does not exist.</returns>
|
|
/// <param name="name">The field name. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns a field having the specified name and binding attributes.</summary>
|
|
/// <returns>A FieldInfo object having the specified name and binding attributes, or null if the field does not exist.</returns>
|
|
/// <param name="name">The field name. </param>
|
|
/// <param name="bindingAttr">One of the BindingFlags bit flags used to control the search. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns the global fields defined on the module.</summary>
|
|
/// <returns>An array of <see cref="T:System.Reflection.FieldInfo" /> objects representing the global fields defined on the module; if there are no global fields, an empty array is returned.</returns>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns a method having the specified name.</summary>
|
|
/// <returns>A MethodInfo object having the specified name, or null if the method does not exist.</returns>
|
|
/// <param name="name">The method name. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="name" /> is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns a method having the specified name and parameter types.</summary>
|
|
/// <returns>A MethodInfo object in accordance with the specified criteria, or null if the method does not exist.</returns>
|
|
/// <param name="name">The method name. </param>
|
|
/// <param name="types">The parameter types to search for. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="name" /> is null, <paramref name="types" /> is null, or <paramref name="types" /> (i) is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns a method having the specified name, binding information, calling convention, and parameter types and modifiers.</summary>
|
|
/// <returns>A MethodInfo object in accordance with the specified criteria, or null if the method does not exist.</returns>
|
|
/// <param name="name">The method name. </param>
|
|
/// <param name="bindingAttr">One of the BindingFlags bit flags used to control the search. </param>
|
|
/// <param name="binder">An object that implements Binder, containing properties related to this method. </param>
|
|
/// <param name="callConvention">The calling convention for the method. </param>
|
|
/// <param name="types">The parameter types to search for. </param>
|
|
/// <param name="modifiers">An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="name" /> is null, <paramref name="types" /> is null, or <paramref name="types" /> (i) is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns the method implementation in accordance with the specified criteria.</summary>
|
|
/// <returns>A MethodInfo object containing implementation information as specified, or null if the method does not exist.</returns>
|
|
/// <param name="name">The method name. </param>
|
|
/// <param name="bindingAttr">One of the BindingFlags bit flags used to control the search. </param>
|
|
/// <param name="binder">An object that implements Binder, containing properties related to this method. </param>
|
|
/// <param name="callConvention">The calling convention for the method. </param>
|
|
/// <param name="types">The parameter types to search for. </param>
|
|
/// <param name="modifiers">An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified. </param>
|
|
/// <exception cref="T:System.Reflection.AmbiguousMatchException">
|
|
/// <paramref name="types" /> is null. </exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns the global methods defined on the module.</summary>
|
|
/// <returns>An array of <see cref="T:System.Reflection.MethodInfo" /> objects representing all the global methods defined on the module; if there are no global methods, an empty array is returned.</returns>
|
|
// 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();
|
|
}
|
|
|
|
/// <summary>Returns the global methods defined on the module that match the specified binding flags.</summary>
|
|
/// <returns>An array of type <see cref="T: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.</returns>
|
|
/// <param name="bindingFlags">A bitwise combination of <see cref="T:System.Reflection.BindingFlags" /> values that limit the search.</param>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns the global fields defined on the module that match the specified binding flags.</summary>
|
|
/// <returns>An array of type <see cref="T: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.</returns>
|
|
/// <param name="bindingFlags">A bitwise combination of <see cref="T:System.Reflection.BindingFlags" /> values that limit the search.</param>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Provides an <see cref="T:System.Runtime.Serialization.ISerializable" /> implementation for serialized objects.</summary>
|
|
/// <param name="info">The information and data needed to serialize or deserialize an object. </param>
|
|
/// <param name="context">The context for the serialization. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="info" /> is null. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="SerializationFormatter" />
|
|
/// </PermissionSet>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>Returns the specified type, performing a case-sensitive search.</summary>
|
|
/// <returns>A Type object representing the given type, if the type is in this module; otherwise, null.</returns>
|
|
/// <param name="className">The name of the type to locate. The name must be fully qualified with the namespace. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="className" /> is null. </exception>
|
|
/// <exception cref="T:System.Reflection.TargetInvocationException">The class initializers are invoked and an exception is thrown. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="className" /> is a zero-length string. </exception>
|
|
/// <exception cref="T:System.IO.FileNotFoundException">
|
|
/// <paramref name="className" /> requires a dependent assembly that could not be found. </exception>
|
|
/// <exception cref="T:System.IO.FileLoadException">
|
|
/// <paramref name="className" /> requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and <paramref name="className" /> requires a dependent assembly that was not preloaded. </exception>
|
|
/// <exception cref="T:System.BadImageFormatException">
|
|
/// <paramref name="className" /> requires a dependent assembly, but the file is not a valid assembly. -or-<paramref name="className" /> requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.</exception>
|
|
// Token: 0x06001EAF RID: 7855 RVA: 0x00071548 File Offset: 0x0006F748
|
|
[ComVisible(true)]
|
|
public virtual Type GetType(string className)
|
|
{
|
|
return this.GetType(className, false, false);
|
|
}
|
|
|
|
/// <summary>Returns the specified type, searching the module with the specified case sensitivity.</summary>
|
|
/// <returns>A Type object representing the given type, if the type is in this module; otherwise, null.</returns>
|
|
/// <param name="className">The name of the type to locate. The name must be fully qualified with the namespace. </param>
|
|
/// <param name="ignoreCase">true for case-insensitive search; otherwise, false. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="className" /> is null. </exception>
|
|
/// <exception cref="T:System.Reflection.TargetInvocationException">The class initializers are invoked and an exception is thrown. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="className" /> is a zero-length string. </exception>
|
|
/// <exception cref="T:System.IO.FileNotFoundException">
|
|
/// <paramref name="className" /> requires a dependent assembly that could not be found. </exception>
|
|
/// <exception cref="T:System.IO.FileLoadException">
|
|
/// <paramref name="className" /> requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and <paramref name="className" /> requires a dependent assembly that was not preloaded. </exception>
|
|
/// <exception cref="T:System.BadImageFormatException">
|
|
/// <paramref name="className" /> requires a dependent assembly, but the file is not a valid assembly. -or-<paramref name="className" /> requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.</exception>
|
|
// 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);
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>A <see cref="T:System.Type" /> object representing the specified type, if the type is declared in this module; otherwise, null.</returns>
|
|
/// <param name="className">The name of the type to locate. The name must be fully qualified with the namespace. </param>
|
|
/// <param name="throwOnError">true to throw an exception if the type cannot be found; false to return null. </param>
|
|
/// <param name="ignoreCase">true for case-insensitive search; otherwise, false. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="className" /> is null. </exception>
|
|
/// <exception cref="T:System.Reflection.TargetInvocationException">The class initializers are invoked and an exception is thrown. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="className" /> is a zero-length string. </exception>
|
|
/// <exception cref="T:System.TypeLoadException">
|
|
/// <paramref name="throwOnError" /> is true, and the type cannot be found. </exception>
|
|
/// <exception cref="T:System.IO.FileNotFoundException">
|
|
/// <paramref name="className" /> requires a dependent assembly that could not be found. </exception>
|
|
/// <exception cref="T:System.IO.FileLoadException">
|
|
/// <paramref name="className" /> requires a dependent assembly that was found but could not be loaded.-or-The current assembly was loaded into the reflection-only context, and <paramref name="className" /> requires a dependent assembly that was not preloaded. </exception>
|
|
/// <exception cref="T:System.BadImageFormatException">
|
|
/// <paramref name="className" /> requires a dependent assembly, but the file is not a valid assembly. -or-<paramref name="className" /> requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.</exception>
|
|
// 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();
|
|
|
|
/// <summary>Returns all the types defined within this module.</summary>
|
|
/// <returns>An array of type Type containing types defined within the module that is reflected by this instance.</returns>
|
|
/// <exception cref="T:System.Reflection.ReflectionTypeLoadException">One or more classes in a module could not be loaded. </exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
|
|
// Token: 0x06001EB3 RID: 7859 RVA: 0x000715A0 File Offset: 0x0006F7A0
|
|
public virtual Type[] GetTypes()
|
|
{
|
|
return this.InternalGetTypes();
|
|
}
|
|
|
|
/// <summary>Determines if the specified <paramref name="attributeType" /> is defined on this module.</summary>
|
|
/// <returns>true if one or more instance of <paramref name="attributeType" /> is defined on this module; otherwise, false.</returns>
|
|
/// <param name="attributeType">The Type object to which the custom attribute is applied. </param>
|
|
/// <param name="inherit">This argument is ignored for objects of this type. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="attributeType" /> is null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="attributeType" /> is not a <see cref="T:System.Type" /> object supplied by the runtime. For example, <paramref name="attributeType" /> is a <see cref="T:System.Reflection.Emit.TypeBuilder" /> object.</exception>
|
|
// Token: 0x06001EB4 RID: 7860 RVA: 0x000715A8 File Offset: 0x0006F7A8
|
|
public virtual bool IsDefined(Type attributeType, bool inherit)
|
|
{
|
|
return MonoCustomAttrs.IsDefined(this, attributeType, inherit);
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the object is a resource.</summary>
|
|
/// <returns>true if the object is a resource; otherwise, false.</returns>
|
|
// Token: 0x06001EB5 RID: 7861 RVA: 0x000715B4 File Offset: 0x0006F7B4
|
|
public bool IsResource()
|
|
{
|
|
return this.is_resource;
|
|
}
|
|
|
|
/// <summary>Returns the name of the module.</summary>
|
|
/// <returns>A String representing the name of this module.</returns>
|
|
// 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();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a universally unique identifier (UUID) that can be used to distinguish between two versions of a module.</summary>
|
|
/// <returns>A <see cref="T:System.Guid" /> that can be used to distinguish between two versions of a module.</returns>
|
|
// Token: 0x170005AF RID: 1455
|
|
// (get) Token: 0x06001EB8 RID: 7864 RVA: 0x000715CC File Offset: 0x0006F7CC
|
|
public Guid ModuleVersionId
|
|
{
|
|
get
|
|
{
|
|
return this.GetModuleVersionId();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a pair of values indicating the nature of the code in a module and the platform targeted by the module.</summary>
|
|
/// <param name="peKind">When this method returns, a combination of the <see cref="T:System.Reflection.PortableExecutableKinds" /> values indicating the nature of the code in the module.</param>
|
|
/// <param name="machine">When this method returns, one of the <see cref="T:System.Reflection.ImageFileMachine" /> values indicating the platform targeted by the module.</param>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Returns the field identified by the specified metadata token.</summary>
|
|
/// <returns>A <see cref="T:System.Reflection.FieldInfo" /> object representing the field that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a field in the module.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a field in the scope of the current module.-or-<paramref name="metadataToken" /> 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).</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// Token: 0x06001EBC RID: 7868 RVA: 0x000716AC File Offset: 0x0006F8AC
|
|
public FieldInfo ResolveField(int metadataToken)
|
|
{
|
|
return this.ResolveField(metadataToken, null, null);
|
|
}
|
|
|
|
/// <summary>Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters.</summary>
|
|
/// <returns>A <see cref="T:System.Reflection.FieldInfo" /> object representing the field that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a field in the module.</param>
|
|
/// <param name="genericTypeArguments">An array of <see cref="T: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. </param>
|
|
/// <param name="genericMethodArguments">An array of <see cref="T: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.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a field in the scope of the current module.-or-<paramref name="metadataToken" /> 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 <paramref name="genericTypeArguments" /> and <paramref name="genericMethodArguments" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Returns the type or member identified by the specified metadata token.</summary>
|
|
/// <returns>A <see cref="T:System.Reflection.MemberInfo" /> object representing the type or member that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a type or member in the module.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a type or member in the scope of the current module.-or-<paramref name="metadataToken" /> 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-<paramref name="metadataToken" /> identifies a property or event.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// Token: 0x06001EBE RID: 7870 RVA: 0x0007170C File Offset: 0x0006F90C
|
|
public MemberInfo ResolveMember(int metadataToken)
|
|
{
|
|
return this.ResolveMember(metadataToken, null, null);
|
|
}
|
|
|
|
/// <summary>Returns the type or member identified by the specified metadata token, in the context defined by the specified generic type parameters.</summary>
|
|
/// <returns>A <see cref="T:System.Reflection.MemberInfo" /> object representing the type or member that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a type or member in the module.</param>
|
|
/// <param name="genericTypeArguments">An array of <see cref="T: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. </param>
|
|
/// <param name="genericMethodArguments">An array of <see cref="T: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.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a type or member in the scope of the current module.-or-<paramref name="metadataToken" /> 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 <paramref name="genericTypeArguments" /> and <paramref name="genericMethodArguments" />.-or-<paramref name="metadataToken" /> identifies a property or event.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Returns the method or constructor identified by the specified metadata token.</summary>
|
|
/// <returns>A <see cref="T:System.Reflection.MethodBase" /> object representing the method or constructor that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a method or constructor in the module.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a method or constructor in the scope of the current module.-or-<paramref name="metadataToken" /> 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).</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// Token: 0x06001EC0 RID: 7872 RVA: 0x00071758 File Offset: 0x0006F958
|
|
public MethodBase ResolveMethod(int metadataToken)
|
|
{
|
|
return this.ResolveMethod(metadataToken, null, null);
|
|
}
|
|
|
|
/// <summary>Returns the method or constructor identified by the specified metadata token, in the context defined by the specified generic type parameters. </summary>
|
|
/// <returns>A <see cref="T:System.Reflection.MethodBase" /> object representing the method that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a method or constructor in the module.</param>
|
|
/// <param name="genericTypeArguments">An array of <see cref="T: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. </param>
|
|
/// <param name="genericMethodArguments">An array of <see cref="T: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.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a method or constructor in the scope of the current module.-or-<paramref name="metadataToken" /> 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 <paramref name="genericTypeArguments" /> and <paramref name="genericMethodArguments" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Returns the string identified by the specified metadata token.</summary>
|
|
/// <returns>A <see cref="T:System.String" /> containing a string value from the metadata string heap.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a string in the string heap of the module. </param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a string in the scope of the current module. </exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Returns the type identified by the specified metadata token.</summary>
|
|
/// <returns>A <see cref="T:System.Type" /> object representing the type that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a type in the module.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a type in the scope of the current module.-or-<paramref name="metadataToken" /> 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). </exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// Token: 0x06001EC3 RID: 7875 RVA: 0x000717EC File Offset: 0x0006F9EC
|
|
public Type ResolveType(int metadataToken)
|
|
{
|
|
return this.ResolveType(metadataToken, null, null);
|
|
}
|
|
|
|
/// <summary>Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.</summary>
|
|
/// <returns>A <see cref="T:System.Type" /> object representing the type that is identified by the specified metadata token.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a type in the module.</param>
|
|
/// <param name="genericTypeArguments">An array of <see cref="T: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. </param>
|
|
/// <param name="genericMethodArguments">An array of <see cref="T: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.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a token for a type in the scope of the current module.-or-<paramref name="metadataToken" /> 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 <paramref name="genericTypeArguments" /> and <paramref name="genericMethodArguments" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Returns the signature blob identified by a metadata token.</summary>
|
|
/// <returns>An array of bytes representing the signature blob.</returns>
|
|
/// <param name="metadataToken">A metadata token that identifies a signature in the module.</param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="metadataToken" /> is not a valid MemberRef, MethodDef, TypeSpec, signature, or FieldDef token in the scope of the current module.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
|
|
// 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;
|
|
|
|
/// <summary>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.</summary>
|
|
// Token: 0x04000AA9 RID: 2729
|
|
public static readonly TypeFilter FilterTypeName = new TypeFilter(Module.filter_by_type_name);
|
|
|
|
/// <summary>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.</summary>
|
|
// 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;
|
|
}
|
|
}
|