using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// Provides a fast way to swap method body implementation given a method of a class.
// Token: 0x02000205 RID: 517
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_MethodRental))]
public sealed class MethodRental : _MethodRental
{
// Token: 0x06001B50 RID: 6992 RVA: 0x000667D8 File Offset: 0x000649D8
private MethodRental()
{
}
/// 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 which receives the IDs corresponding to the names.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001B51 RID: 6993 RVA: 0x000667E0 File Offset: 0x000649E0
void _MethodRental.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.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001B52 RID: 6994 RVA: 0x000667E8 File Offset: 0x000649E8
void _MethodRental.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.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001B53 RID: 6995 RVA: 0x000667F0 File Offset: 0x000649F0
void _MethodRental.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.
/// The method is called late-bound using the COM IDispatch interface.
// Token: 0x06001B54 RID: 6996 RVA: 0x000667F8 File Offset: 0x000649F8
void _MethodRental.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException();
}
/// Swaps the body of a method.
/// The class containing the method.
/// The token for the method.
/// A pointer to the method. This should include the method header.
/// The size of the new method body in bytes.
/// Flags that control the swapping. See the definitions of the constants.
///
/// is null.
/// The type is not complete.
///
/// is less than one or greater than 4128767 (3effff hex).
///
///
///
// Token: 0x06001B55 RID: 6997 RVA: 0x00066800 File Offset: 0x00064A00
[MonoTODO]
public static void SwapMethodBody(Type cls, int methodtoken, IntPtr rgIL, int methodSize, int flags)
{
if (methodSize <= 0 || methodSize >= 4128768)
{
throw new ArgumentException("Data size must be > 0 and < 0x3f0000", "methodSize");
}
if (cls == null)
{
throw new ArgumentNullException("cls");
}
if (cls is TypeBuilder && !((TypeBuilder)cls).is_created)
{
throw new NotSupportedException("Type '" + cls + "' is not yet created.");
}
throw new NotImplementedException();
}
/// Specifies that the method should be just-in-time (JIT) compiled immediately.
// Token: 0x0400082E RID: 2094
public const int JitImmediate = 1;
/// Specifies that the method should be just-in-time (JIT) compiled when needed.
// Token: 0x0400082F RID: 2095
public const int JitOnDemand = 0;
}
}