using System;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// Defines and represents a dynamic method that can be compiled, executed, and discarded. Discarded methods are available for garbage collection.
// Token: 0x020001EC RID: 492
[ComVisible(true)]
public sealed class DynamicMethod : MethodInfo
{
/// Creates a dynamic method that is global to a module, specifying the method name, return type, parameter types, and module.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A representing the module with which the dynamic method is to be logically associated.
/// An element of is null or . -or- is a module that provides anonymous hosting for dynamic methods.
///
/// is null. -or- is null.
///
/// is a type for which returns true.
// Token: 0x06001987 RID: 6535 RVA: 0x000618B4 File Offset: 0x0005FAB4
public DynamicMethod(string name, Type returnType, Type[] parameterTypes, Module m)
: this(name, returnType, parameterTypes, m, false)
{
}
/// Creates a dynamic method, specifying the method name, return type, parameter types, and the type with which the dynamic method is logically associated.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A with which the dynamic method is logically associated. The dynamic method has access to all members of the type.
/// An element of is null or .-or- is an interface, an array, an open generic type, or a type parameter of a generic type or method.
///
/// is null. -or- is null.
///
/// is null, or is a type for which returns true.
// Token: 0x06001988 RID: 6536 RVA: 0x000618C4 File Offset: 0x0005FAC4
public DynamicMethod(string name, Type returnType, Type[] parameterTypes, Type owner)
: this(name, returnType, parameterTypes, owner, false)
{
}
/// Creates a dynamic method that is global to a module, specifying the method name, return type, parameter types, module, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A representing the module with which the dynamic method is to be logically associated.
/// true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method.
/// An element of is null or . -or- is a module that provides anonymous hosting for dynamic methods.
///
/// is null. -or- is null.
///
/// is a type for which returns true.
// Token: 0x06001989 RID: 6537 RVA: 0x000618D4 File Offset: 0x0005FAD4
public DynamicMethod(string name, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
: this(name, MethodAttributes.FamANDAssem | MethodAttributes.Family | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, m, skipVisibility)
{
}
/// Creates a dynamic method, specifying the method name, return type, parameter types, the type with which the dynamic method is logically associated, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A with which the dynamic method is logically associated. The dynamic method has access to all members of the type.
/// true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method; otherwise, false.
/// An element of is null or .-or- is an interface, an array, an open generic type, or a type parameter of a generic type or method.
///
/// is null. -or- is null.
///
/// is null, or is a type for which returns true.
// Token: 0x0600198A RID: 6538 RVA: 0x000618F4 File Offset: 0x0005FAF4
public DynamicMethod(string name, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
: this(name, MethodAttributes.FamANDAssem | MethodAttributes.Family | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, owner, skipVisibility)
{
}
/// Creates a dynamic method, specifying the method name, attributes, calling convention, return type, parameter types, the type with which the dynamic method is logically associated, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A bitwise combination of values that specifies the attributes of the dynamic method. The only combination allowed is and .
/// The calling convention for the dynamic method. Must be .
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A with which the dynamic method is logically associated. The dynamic method has access to all members of the type.
/// true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method; otherwise, false.
/// An element of is null or . -or- is an interface, an array, an open generic type, or a type parameter of a generic type or method.
///
/// is null. -or- is null.
///
/// is a combination of flags other than and .-or- is not .-or- is a type for which returns true.
// Token: 0x0600198B RID: 6539 RVA: 0x00061914 File Offset: 0x0005FB14
public DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
: this(name, attributes, callingConvention, returnType, parameterTypes, owner, owner.Module, skipVisibility, false)
{
}
/// Creates a dynamic method that is global to a module, specifying the method name, attributes, calling convention, return type, parameter types, module, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A bitwise combination of values that specifies the attributes of the dynamic method. The only combination allowed is and .
/// The calling convention for the dynamic method. Must be .
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// A representing the module with which the dynamic method is to be logically associated.
/// true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method; otherwise, false.
/// An element of is null or .-or- is a module that provides anonymous hosting for dynamic methods.
///
/// is null. -or- is null.
///
/// is a combination of flags other than and .-or- is not .-or- is a type for which returns true.
// Token: 0x0600198C RID: 6540 RVA: 0x0006193C File Offset: 0x0005FB3C
public DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
: this(name, attributes, callingConvention, returnType, parameterTypes, null, m, skipVisibility, false)
{
}
/// Initializes an anonymously hosted dynamic method, specifying the method name, return type, and parameter types.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// An element of is null or .
///
/// is null.
///
/// is a type for which returns true.
// Token: 0x0600198D RID: 6541 RVA: 0x0006195C File Offset: 0x0005FB5C
public DynamicMethod(string name, Type returnType, Type[] parameterTypes)
: this(name, returnType, parameterTypes, false)
{
}
/// Initializes an anonymously hosted dynamic method, specifying the method name, return type, parameter types, and whether just-in-time (JIT) visibility checks should be skipped for types and members accessed by the Microsoft intermediate language (MSIL) of the dynamic method.
/// The name of the dynamic method. This can be a zero-length string, but it cannot be null.
/// A object that specifies the return type of the dynamic method, or null if the method has no return type.
/// An array of objects specifying the types of the parameters of the dynamic method, or null if the method has no parameters.
/// true to skip JIT visibility checks on types and members accessed by the MSIL of the dynamic method, with this restriction: the trust level of the assemblies that contain those types and members must be equal to or less than the trust level of the call stack that emits the dynamic method; otherwise, false.
/// An element of is null or .
///
/// is null.
///
/// is a type for which returns true.
// Token: 0x0600198E RID: 6542 RVA: 0x00061968 File Offset: 0x0005FB68
[MonoTODO("Visibility is not restricted")]
public DynamicMethod(string name, Type returnType, Type[] parameterTypes, bool restrictedSkipVisibility)
: this(name, MethodAttributes.FamANDAssem | MethodAttributes.Family | MethodAttributes.Static, CallingConventions.Standard, returnType, parameterTypes, null, null, restrictedSkipVisibility, true)
{
}
// Token: 0x0600198F RID: 6543 RVA: 0x00061988 File Offset: 0x0005FB88
private DynamicMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type owner, Module m, bool skipVisibility, bool anonHosted)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (returnType == null)
{
returnType = typeof(void);
}
if (m == null && !anonHosted)
{
throw new ArgumentNullException("m");
}
if (returnType.IsByRef)
{
throw new ArgumentException("Return type can't be a byref type", "returnType");
}
if (parameterTypes != null)
{
for (int i = 0; i < parameterTypes.Length; i++)
{
if (parameterTypes[i] == null)
{
throw new ArgumentException("Parameter " + i + " is null", "parameterTypes");
}
}
}
if (m == null)
{
m = DynamicMethod.AnonHostModuleHolder.anon_host_module;
}
this.name = name;
this.attributes = attributes | MethodAttributes.Static;
this.callingConvention = callingConvention;
this.returnType = returnType;
this.parameters = parameterTypes;
this.owner = owner;
this.module = m;
this.skipVisibility = skipVisibility;
}
// Token: 0x06001990 RID: 6544
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void create_dynamic_method(DynamicMethod m);
// Token: 0x06001991 RID: 6545
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void destroy_dynamic_method(DynamicMethod m);
// Token: 0x06001992 RID: 6546 RVA: 0x00061A90 File Offset: 0x0005FC90
private void CreateDynMethod()
{
if (this.mhandle.Value == IntPtr.Zero)
{
if (this.ilgen == null || ILGenerator.Mono_GetCurrentOffset(this.ilgen) == 0)
{
throw new InvalidOperationException("Method '" + this.name + "' does not have a method body.");
}
this.ilgen.label_fixup();
try
{
this.creating = true;
if (this.refs != null)
{
for (int i = 0; i < this.refs.Length; i++)
{
if (this.refs[i] is DynamicMethod)
{
DynamicMethod dynamicMethod = (DynamicMethod)this.refs[i];
if (!dynamicMethod.creating)
{
dynamicMethod.CreateDynMethod();
}
}
}
}
}
finally
{
this.creating = false;
}
this.create_dynamic_method(this);
}
}
// Token: 0x06001993 RID: 6547 RVA: 0x00061B84 File Offset: 0x0005FD84
~DynamicMethod()
{
this.destroy_dynamic_method(this);
}
/// Completes the dynamic method and creates a delegate that can be used to execute it.
/// A delegate of the specified type, which can be used to execute the dynamic method.
/// A delegate type whose signature matches that of the dynamic method.
/// The dynamic method has no method body.
///
/// has the wrong number of parameters or the wrong parameter types.
// Token: 0x06001994 RID: 6548 RVA: 0x00061BC0 File Offset: 0x0005FDC0
[ComVisible(true)]
public Delegate CreateDelegate(Type delegateType)
{
if (delegateType == null)
{
throw new ArgumentNullException("delegateType");
}
if (this.deleg != null)
{
return this.deleg;
}
this.CreateDynMethod();
this.deleg = Delegate.CreateDelegate(delegateType, this);
return this.deleg;
}
/// Completes the dynamic method and creates a delegate that can be used to execute it, specifying the delegate type and an object the delegate is bound to.
/// A delegate of the specified type, which can be used to execute the dynamic method with the specified target object.
/// A delegate type whose signature matches that of the dynamic method, minus the first parameter.
/// An object the delegate is bound to. Must be of the same type as the first parameter of the dynamic method.
/// The dynamic method has no method body.
///
/// is not the same type as the first parameter of the dynamic method, and is not assignable to that type.-or- has the wrong number of parameters or the wrong parameter types.
// Token: 0x06001995 RID: 6549 RVA: 0x00061C0C File Offset: 0x0005FE0C
[ComVisible(true)]
public Delegate CreateDelegate(Type delegateType, object target)
{
if (delegateType == null)
{
throw new ArgumentNullException("delegateType");
}
this.CreateDynMethod();
return Delegate.CreateDelegate(delegateType, target, this);
}
/// Defines a parameter of the dynamic method.
/// Always returns null.
/// The position of the parameter in the parameter list. Parameters are indexed beginning with the number 1 for the first parameter.
/// A bitwise combination of values that specifies the attributes of the parameter.
/// The name of the parameter. The name can be a zero-length string.
/// The method has no parameters.-or- is less than 0.-or- is greater than the number of the method's parameters.
// Token: 0x06001996 RID: 6550 RVA: 0x00061C30 File Offset: 0x0005FE30
public ParameterBuilder DefineParameter(int position, ParameterAttributes attributes, string parameterName)
{
if (position < 0 || position > this.parameters.Length)
{
throw new ArgumentOutOfRangeException("position");
}
this.RejectIfCreated();
ParameterBuilder parameterBuilder = new ParameterBuilder(this, position, attributes, parameterName);
if (this.pinfo == null)
{
this.pinfo = new ParameterBuilder[this.parameters.Length + 1];
}
this.pinfo[position] = parameterBuilder;
return parameterBuilder;
}
/// Returns the base implementation for the method.
/// The base implementation of the method.
// Token: 0x06001997 RID: 6551 RVA: 0x00061C98 File Offset: 0x0005FE98
public override MethodInfo GetBaseDefinition()
{
return this;
}
/// Returns all the custom attributes defined for the method.
/// An array of objects representing all the custom attributes of the method.
/// true to search the method's inheritance chain to find the custom attributes; false to check only the current method.
// Token: 0x06001998 RID: 6552 RVA: 0x00061C9C File Offset: 0x0005FE9C
[MonoTODO("Not implemented")]
public override object[] GetCustomAttributes(bool inherit)
{
throw new NotImplementedException();
}
/// Returns the custom attributes of the specified type that have been applied to the method.
/// An array of objects representing the attributes of the method that are of type or derive from type .
/// A representing the type of custom attribute to return.
/// true to search the method's inheritance chain to find the custom attributes; false to check only the current method.
///
/// is null.
// Token: 0x06001999 RID: 6553 RVA: 0x00061CA4 File Offset: 0x0005FEA4
[MonoTODO("Not implemented")]
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{
throw new NotImplementedException();
}
/// Returns a object that can be used to generate a method body from metadata tokens, scopes, and Microsoft intermediate language (MSIL) streams.
/// A object that can be used to generate a method body from metadata tokens, scopes, and MSIL streams.
///
///
///
// Token: 0x0600199A RID: 6554 RVA: 0x00061CAC File Offset: 0x0005FEAC
[MonoTODO("Not implemented")]
public DynamicILInfo GetDynamicILInfo()
{
throw new NotImplementedException();
}
/// Returns a Microsoft intermediate language (MSIL) generator for the method with a default MSIL stream size of 64 bytes.
/// An object for the method.
// Token: 0x0600199B RID: 6555 RVA: 0x00061CB4 File Offset: 0x0005FEB4
public ILGenerator GetILGenerator()
{
return this.GetILGenerator(64);
}
/// Returns a Microsoft intermediate language (MSIL) generator for the method with the specified MSIL stream size.
/// An object for the method, with the specified MSIL stream size.
/// The size of the MSIL stream, in bytes.
// Token: 0x0600199C RID: 6556 RVA: 0x00061CC0 File Offset: 0x0005FEC0
public ILGenerator GetILGenerator(int streamSize)
{
if ((this.GetMethodImplementationFlags() & MethodImplAttributes.CodeTypeMask) != MethodImplAttributes.IL || (this.GetMethodImplementationFlags() & MethodImplAttributes.ManagedMask) != MethodImplAttributes.IL)
{
throw new InvalidOperationException("Method body should not exist.");
}
if (this.ilgen != null)
{
return this.ilgen;
}
this.ilgen = new ILGenerator(this.Module, new DynamicMethodTokenGenerator(this), streamSize);
return this.ilgen;
}
/// Returns the implementation flags for the method.
/// A bitwise combination of values representing the implementation flags for the method.
// Token: 0x0600199D RID: 6557 RVA: 0x00061D24 File Offset: 0x0005FF24
public override MethodImplAttributes GetMethodImplementationFlags()
{
return MethodImplAttributes.IL;
}
/// Returns the parameters of the dynamic method.
/// An array of objects that represent the parameters of the dynamic method.
// Token: 0x0600199E RID: 6558 RVA: 0x00061D28 File Offset: 0x0005FF28
public override ParameterInfo[] GetParameters()
{
if (this.parameters == null)
{
return new ParameterInfo[0];
}
ParameterInfo[] array = new ParameterInfo[this.parameters.Length];
for (int i = 0; i < this.parameters.Length; i++)
{
array[i] = new ParameterInfo((this.pinfo != null) ? this.pinfo[i + 1] : null, this.parameters[i], this, i + 1);
}
return array;
}
/// Invokes the dynamic method using the specified parameters, under the constraints of the specified binder, with the specified culture information.
/// A containing the return value of the invoked method.
/// This parameter is ignored for dynamic methods, because they are static. Specify null.
/// A bitwise combination of values.
/// A object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used. For more details, see .
/// An argument list. This is an array of arguments with the same number, order, and type as the parameters of the method to be invoked. If there are no parameters this parameter should be null.
/// An instance of used to govern the coercion of types. If this is null, the for the current thread is used. For example, this information is needed to correctly convert a that represents 1000 to a value, because 1000 is represented differently by different cultures.
/// The calling convention is not supported.
/// The number of elements in does not match the number of parameters in the dynamic method.
/// The type of one or more elements of does not match the type of the corresponding parameter of the dynamic method.
/// The dynamic method is associated with a module, is not anonymously hosted, and was constructed with set to false, but the dynamic method accesses members that are not public or internal (Friend in Visual Basic).-or-The dynamic method is anonymously hosted and was constructed with set to false, but it accesses members that are not public.
///
///
///
// Token: 0x0600199F RID: 6559 RVA: 0x00061DA0 File Offset: 0x0005FFA0
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
{
object obj2;
try
{
this.CreateDynMethod();
if (this.method == null)
{
this.method = new MonoMethod(this.mhandle);
}
obj2 = this.method.Invoke(obj, parameters);
}
catch (MethodAccessException ex)
{
throw new TargetInvocationException("Method cannot be invoked.", ex);
}
return obj2;
}
/// Indicates whether the specified custom attribute type is defined.
/// true if the specified custom attribute type is defined; otherwise, false.
/// A representing the type of custom attribute to search for.
/// true to search the method's inheritance chain to find the custom attributes; false to check only the current method.
// Token: 0x060019A0 RID: 6560 RVA: 0x00061E18 File Offset: 0x00060018
[MonoTODO("Not implemented")]
public override bool IsDefined(Type attributeType, bool inherit)
{
throw new NotImplementedException();
}
/// Returns the signature of the method, represented as a string.
/// A string representing the method signature.
// Token: 0x060019A1 RID: 6561 RVA: 0x00061E20 File Offset: 0x00060020
public override string ToString()
{
string text = string.Empty;
ParameterInfo[] array = this.GetParameters();
for (int i = 0; i < array.Length; i++)
{
if (i > 0)
{
text += ", ";
}
text += array[i].ParameterType.Name;
}
return string.Concat(new string[]
{
this.ReturnType.Name,
" ",
this.Name,
"(",
text,
")"
});
}
/// Gets the attributes specified when the dynamic method was created.
/// A bitwise combination of the values representing the attributes for the method.
// Token: 0x1700047C RID: 1148
// (get) Token: 0x060019A2 RID: 6562 RVA: 0x00061EB4 File Offset: 0x000600B4
public override MethodAttributes Attributes
{
get
{
return this.attributes;
}
}
/// Gets the calling convention specified when the dynamic method was created.
/// One of the values that indicates the calling convention of the method.
// Token: 0x1700047D RID: 1149
// (get) Token: 0x060019A3 RID: 6563 RVA: 0x00061EBC File Offset: 0x000600BC
public override CallingConventions CallingConvention
{
get
{
return this.callingConvention;
}
}
/// Gets the type that declares the method, which is always null for dynamic methods.
/// Always null.
// Token: 0x1700047E RID: 1150
// (get) Token: 0x060019A4 RID: 6564 RVA: 0x00061EC4 File Offset: 0x000600C4
public override Type DeclaringType
{
get
{
return null;
}
}
/// Gets or sets a value indicating whether the local variables in the method are zero-initialized.
/// true if the local variables in the method are zero-initialized; otherwise, false. The default is true.
// Token: 0x1700047F RID: 1151
// (get) Token: 0x060019A5 RID: 6565 RVA: 0x00061EC8 File Offset: 0x000600C8
// (set) Token: 0x060019A6 RID: 6566 RVA: 0x00061ED0 File Offset: 0x000600D0
public bool InitLocals
{
get
{
return this.init_locals;
}
set
{
this.init_locals = value;
}
}
/// Not supported for dynamic methods.
/// Not supported for dynamic methods.
/// Not allowed for dynamic methods.
// Token: 0x17000480 RID: 1152
// (get) Token: 0x060019A7 RID: 6567 RVA: 0x00061EDC File Offset: 0x000600DC
public override RuntimeMethodHandle MethodHandle
{
get
{
return this.mhandle;
}
}
/// Gets the module with which the dynamic method is logically associated.
/// The with which the current dynamic method is associated.
// Token: 0x17000481 RID: 1153
// (get) Token: 0x060019A8 RID: 6568 RVA: 0x00061EE4 File Offset: 0x000600E4
public override Module Module
{
get
{
return this.module;
}
}
/// Gets the name of the dynamic method.
/// The simple name of the method.
// Token: 0x17000482 RID: 1154
// (get) Token: 0x060019A9 RID: 6569 RVA: 0x00061EEC File Offset: 0x000600EC
public override string Name
{
get
{
return this.name;
}
}
/// Gets the class that was used in reflection to obtain the method.
/// Always null.
// Token: 0x17000483 RID: 1155
// (get) Token: 0x060019AA RID: 6570 RVA: 0x00061EF4 File Offset: 0x000600F4
public override Type ReflectedType
{
get
{
return null;
}
}
/// Gets the return parameter of the dynamic method.
/// Always null.
// Token: 0x17000484 RID: 1156
// (get) Token: 0x060019AB RID: 6571 RVA: 0x00061EF8 File Offset: 0x000600F8
[MonoTODO("Not implemented")]
public override ParameterInfo ReturnParameter
{
get
{
throw new NotImplementedException();
}
}
/// Gets the type of return value for the dynamic method.
/// A representing the type of the return value of the current method; if the method has no return type.
// Token: 0x17000485 RID: 1157
// (get) Token: 0x060019AC RID: 6572 RVA: 0x00061F00 File Offset: 0x00060100
public override Type ReturnType
{
get
{
return this.returnType;
}
}
/// Gets the custom attributes of the return type for the dynamic method.
/// An representing the custom attributes of the return type for the dynamic method.
// Token: 0x17000486 RID: 1158
// (get) Token: 0x060019AD RID: 6573 RVA: 0x00061F08 File Offset: 0x00060108
[MonoTODO("Not implemented")]
public override ICustomAttributeProvider ReturnTypeCustomAttributes
{
get
{
throw new NotImplementedException();
}
}
// Token: 0x060019AE RID: 6574 RVA: 0x00061F10 File Offset: 0x00060110
private void RejectIfCreated()
{
if (this.mhandle.Value != IntPtr.Zero)
{
throw new InvalidOperationException("Type definition of the method is complete.");
}
}
// Token: 0x060019AF RID: 6575 RVA: 0x00061F38 File Offset: 0x00060138
internal int AddRef(object reference)
{
if (this.refs == null)
{
this.refs = new object[4];
}
if (this.nrefs >= this.refs.Length - 1)
{
object[] array = new object[this.refs.Length * 2];
Array.Copy(this.refs, array, this.refs.Length);
this.refs = array;
}
this.refs[this.nrefs] = reference;
this.refs[this.nrefs + 1] = null;
this.nrefs += 2;
return this.nrefs - 1;
}
// Token: 0x0400078D RID: 1933
private RuntimeMethodHandle mhandle;
// Token: 0x0400078E RID: 1934
private string name;
// Token: 0x0400078F RID: 1935
private Type returnType;
// Token: 0x04000790 RID: 1936
private Type[] parameters;
// Token: 0x04000791 RID: 1937
private MethodAttributes attributes;
// Token: 0x04000792 RID: 1938
private CallingConventions callingConvention;
// Token: 0x04000793 RID: 1939
private Module module;
// Token: 0x04000794 RID: 1940
private bool skipVisibility;
// Token: 0x04000795 RID: 1941
private bool init_locals = true;
// Token: 0x04000796 RID: 1942
private ILGenerator ilgen;
// Token: 0x04000797 RID: 1943
private int nrefs;
// Token: 0x04000798 RID: 1944
private object[] refs;
// Token: 0x04000799 RID: 1945
private IntPtr referenced_by;
// Token: 0x0400079A RID: 1946
private Type owner;
// Token: 0x0400079B RID: 1947
private Delegate deleg;
// Token: 0x0400079C RID: 1948
private MonoMethod method;
// Token: 0x0400079D RID: 1949
private ParameterBuilder[] pinfo;
// Token: 0x0400079E RID: 1950
internal bool creating;
// Token: 0x020001ED RID: 493
private class AnonHostModuleHolder
{
// Token: 0x060019B1 RID: 6577 RVA: 0x00061FD8 File Offset: 0x000601D8
static AnonHostModuleHolder()
{
AssemblyName assemblyName = new AssemblyName();
assemblyName.Name = "Anonymously Hosted DynamicMethods Assembly";
AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
DynamicMethod.AnonHostModuleHolder.anon_host_module = assemblyBuilder.GetManifestModule();
}
// Token: 0x0400079F RID: 1951
public static Module anon_host_module;
}
}
}