5 instantiations of RuntimeMethodHandle
System.Private.CoreLib (5)
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (1)
85
return new
RuntimeMethodHandle
(_methodHandle!);
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (1)
194
public override RuntimeMethodHandle MethodHandle => new
RuntimeMethodHandle
(this);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
265
public override RuntimeMethodHandle MethodHandle => new
RuntimeMethodHandle
(this);
src\System\RuntimeHandles.cs (2)
997
return new
RuntimeMethodHandle
(methodInfo);
1827
return new
RuntimeMethodHandle
(retVal);
153 references to RuntimeMethodHandle
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (2)
183
public static
RuntimeMethodHandle
MethodHandle(this MethodBase mb)
187
public static
RuntimeMethodHandle
MethodHandle(this MethodInfo mi)
illink (2)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
43
/// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.
RuntimeMethodHandle
)"/></item>
44
/// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.
RuntimeMethodHandle
, System.RuntimeTypeHandle)"/></item>
ILLink.RoslynAnalyzer (2)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
43
/// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.
RuntimeMethodHandle
)"/></item>
44
/// <item><see cref="System.Reflection.MethodBase.GetMethodFromHandle(System.
RuntimeMethodHandle
, System.RuntimeTypeHandle)"/></item>
Microsoft.CodeAnalysis (1)
SpecialType.cs (1)
232
/// Indicates that the type is <see cref="
RuntimeMethodHandle
"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
232
/// Indicates that the type is <see cref="
RuntimeMethodHandle
"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Debugger\MemberInfo\ConstructorInfoImpl.cs (1)
79
public override
RuntimeMethodHandle
MethodHandle
Debugger\MemberInfo\MethodInfoImpl.cs (1)
61
public override
RuntimeMethodHandle
MethodHandle
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
784
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
RuntimeMethodHandle
))]
netstandard (1)
netstandard.cs (1)
1818
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
RuntimeMethodHandle
))]
System.Linq.Expressions (2)
System\Linq\Expressions\Common\CachedReflectionInfo.cs (2)
63
s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(
RuntimeMethodHandle
) })!;
67
s_MethodBase_GetMethodFromHandle_RuntimeMethodHandle_RuntimeTypeHandle ??= typeof(MethodBase).GetMethod(nameof(MethodBase.GetMethodFromHandle), new[] { typeof(
RuntimeMethodHandle
), typeof(RuntimeTypeHandle) })!;
System.Private.CoreLib (129)
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
399
dest![i] =
RuntimeMethodHandle
.ReboxFromNullable(copyOfParameters[i]);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorOnTypeBuilderInstantiation.cs (1)
52
public override
RuntimeMethodHandle
MethodHandle => _ctor.MethodHandle;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
324
public override
RuntimeMethodHandle
MethodHandle => throw new InvalidOperationException(SR.InvalidOperation_NotAllowedInDynamicMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
56
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
64
public override
RuntimeMethodHandle
MethodHandle => _method.MethodHandle;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
59
public abstract
RuntimeMethodHandle
MethodHandle { get; }
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (1)
334
dest![i] =
RuntimeMethodHandle
.ReboxFromNullable(copyOfParameters[i]);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
452
dest![i] =
RuntimeMethodHandle
.ReboxFromNullable(copyOfParameters[i]);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs (2)
25
/// unmanaged callback can be returned, otherwise <c>null</c>. The <see cref="
RuntimeMethodHandle
"/> is to the
35
RuntimeMethodHandle
lastMethod,
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (5)
805
value =
RuntimeMethodHandle
.ReboxToNullable(value, this);
849
value =
RuntimeMethodHandle
.ReboxToNullable(value, this);
876
value =
RuntimeMethodHandle
.ReboxToNullable(value, this);
920
return
RuntimeMethodHandle
.ReboxToNullable(null, type);
942
value =
RuntimeMethodHandle
.ReboxToNullable(value, sigElementType);
src\System\Delegate.CoreCLR.cs (4)
167
RuntimeType? declaringType =
RuntimeMethodHandle
.GetDeclaringType(method);
172
bool isStatic = (
RuntimeMethodHandle
.GetAttributes(method) & MethodAttributes.Static) != (MethodAttributes)0;
367
internal static Delegate CreateDelegateNoSecurityCheck(Type type, object? target,
RuntimeMethodHandle
method)
389
RuntimeMethodHandle
.GetDeclaringType(method.GetMethodInfo()),
src\System\Diagnostics\StackFrameHelper.cs (1)
167
IRuntimeMethodInfo? mhReal =
RuntimeMethodHandle
.GetTypicalMethodDefinition(new RuntimeMethodInfoStub(mh, this));
src\System\MulticastDelegate.CoreCLR.cs (1)
524
RuntimeType declaringType =
RuntimeMethodHandle
.GetDeclaringType(method);
src\System\Reflection\Associates.cs (2)
71
MethodAttributes methAttr =
RuntimeMethodHandle
.GetAttributes(associateMethodHandle);
95
int slot =
RuntimeMethodHandle
.GetSlot(associateMethodHandle);
src\System\Reflection\ConstructorInvoker.CoreCLR.cs (1)
18
return
RuntimeMethodHandle
.InvokeMethod(obj, (void**)args, _signature!, isConstructor: obj is null);
src\System\Reflection\Emit\DynamicILGenerator.cs (12)
645
if (
RuntimeMethodHandle
.GetResolver(m_methodHandle) != null)
653
RuntimeMethodHandle
.Destroy(m_methodHandle);
779
if (handle is
RuntimeMethodHandle
)
781
methodHandle = ((
RuntimeMethodHandle
)handle).Value;
928
public int GetTokenFor(
RuntimeMethodHandle
method)
936
public int GetTokenFor(
RuntimeMethodHandle
method, RuntimeTypeHandle contextType)
1003
public int GetTokenFor(
RuntimeMethodHandle
method)
1009
if (!
RuntimeMethodHandle
.IsDynamicMethod(rmhi))
1011
RuntimeType type =
RuntimeMethodHandle
.GetDeclaringType(rmhi);
1026
public int GetTokenFor(
RuntimeMethodHandle
method, RuntimeTypeHandle typeContext)
1066
internal
RuntimeMethodHandle
m_methodHandle;
1069
internal GenericMethodInfo(
RuntimeMethodHandle
methodHandle, RuntimeTypeHandle context)
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (1)
65
internal
RuntimeMethodHandle
GetMethodDescriptor()
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (1)
94
public override
RuntimeMethodHandle
MethodHandle => m_methodBuilder.MethodHandle;
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
440
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
src\System\Reflection\Emit\SymbolMethod.cs (1)
96
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_SymbolMethod);
src\System\Reflection\MethodBase.CoreCLR.cs (2)
15
public static MethodBase? GetMethodFromHandle(
RuntimeMethodHandle
handle)
31
public static MethodBase? GetMethodFromHandle(
RuntimeMethodHandle
handle, RuntimeTypeHandle declaringType)
src\System\Reflection\MethodBaseInvoker.CoreCLR.cs (2)
33
RuntimeMethodHandle
.InvokeMethod(obj, (void**)args, _signature!, isConstructor: obj is null);
36
RuntimeMethodHandle
.InvokeMethod(obj, (void**)args, _signature!, isConstructor: false);
src\System\Reflection\MethodInvoker.CoreCLR.cs (2)
34
RuntimeMethodHandle
.InvokeMethod(obj, (void**)args, _signature!, isConstructor: false);
37
RuntimeMethodHandle
.InvokeMethod(obj, (void**)args, _signature!, isConstructor: obj is null);
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (5)
161
public override string Name =>
RuntimeMethodHandle
.GetName(this);
170
public override int MetadataToken =>
RuntimeMethodHandle
.GetMethodDef(this);
191
return
RuntimeMethodHandle
.GetImplAttributes(this);
194
public override
RuntimeMethodHandle
MethodHandle => new RuntimeMethodHandle(this);
222
RuntimeMethodBody? mb =
RuntimeMethodHandle
.GetMethodBody(this, ReflectedTypeInternal);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (17)
60
Debug.Assert(methodAttributes ==
RuntimeMethodHandle
.GetAttributes(handle));
116
int slot =
RuntimeMethodHandle
.GetSlot(this);
130
internal sealed override int GenericParameterCount =>
RuntimeMethodHandle
.GetGenericParameterCount(this);
145
sbName.Append(
RuntimeMethodHandle
.ConstructInstantiation(this, TypeNameFormatFlags.FormatBasic));
204
public override string Name => m_name ??=
RuntimeMethodHandle
.GetName(this);
231
public override int MetadataToken =>
RuntimeMethodHandle
.GetMethodDef(this);
262
return
RuntimeMethodHandle
.GetImplAttributes(this);
265
public override
RuntimeMethodHandle
MethodHandle => new RuntimeMethodHandle(this);
276
RuntimeMethodBody? mb =
RuntimeMethodHandle
.GetMethodBody(this, ReflectedTypeInternal);
322
public override bool IsCollectible =>
RuntimeMethodHandle
.GetIsCollectible(new RuntimeMethodHandleInternal(m_handle)) != Interop.BOOL.FALSE;
329
int slot =
RuntimeMethodHandle
.GetSlot(this);
435
RuntimeMethodHandle
.GetStubIfNeeded(new RuntimeMethodHandleInternal(m_handle), m_declaringType, methodInstantionRuntimeType)) as MethodInfo;
447
RuntimeMethodHandle
.GetMethodInstantiationInternal(this);
450
RuntimeMethodHandle
.GetMethodInstantiationPublic(this) ?? Type.EmptyTypes;
457
return (RuntimeType.GetMethodBase(m_declaringType,
RuntimeMethodHandle
.StripMethodInstantiation(this)) as MethodInfo)!;
460
public override bool IsGenericMethod =>
RuntimeMethodHandle
.HasMethodInstantiation(this);
462
public override bool IsGenericMethodDefinition =>
RuntimeMethodHandle
.IsGenericMethodDefinition(this);
src\System\Reflection\RuntimeModule.cs (1)
109
Type declaringType =
RuntimeMethodHandle
.GetDeclaringType(methodHandle);
src\System\Reflection\RuntimeParameterInfo.cs (2)
44
int tkMethodDef =
RuntimeMethodHandle
.GetMethodDef(methodHandle);
51
MetadataImport scope =
RuntimeMethodHandle
.GetDeclaringType(methodHandle).GetRuntimeModule().MetadataImport;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
202
public static void PrepareMethod(
RuntimeMethodHandle
method) => PrepareMethod(method, null);
204
public static unsafe void PrepareMethod(
RuntimeMethodHandle
method, RuntimeTypeHandle[]? instantiation)
src\System\RuntimeHandles.cs (22)
941
public unsafe partial struct RuntimeMethodHandle : IEquatable<
RuntimeMethodHandle
>, ISerializable
980
if (obj is not
RuntimeMethodHandle
)
983
RuntimeMethodHandle
handle = (
RuntimeMethodHandle
)obj;
989
/// Returns a new <see cref="
RuntimeMethodHandle
"/> object created from a handle to a RuntimeMethodInfo.
991
/// <param name="value">An IntPtr handle to a RuntimeMethodInfo to create a <see cref="
RuntimeMethodHandle
"/> object from.</param>
992
/// <returns>A new <see cref="
RuntimeMethodHandle
"/> object that corresponds to the value parameter.</returns>
993
public static
RuntimeMethodHandle
FromIntPtr(IntPtr value)
1001
/// Returns the internal pointer representation of a <see cref="
RuntimeMethodHandle
"/> object.
1003
/// <param name="value">A <see cref="
RuntimeMethodHandle
"/> object to retrieve an internal pointer representation from.</param>
1004
/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="
RuntimeMethodHandle
"/> object.</returns>
1005
public static IntPtr ToIntPtr(
RuntimeMethodHandle
value) => value.Value;
1007
public static bool operator ==(
RuntimeMethodHandle
left,
RuntimeMethodHandle
right) => left.Equals(right);
1009
public static bool operator !=(
RuntimeMethodHandle
left,
RuntimeMethodHandle
right) => !left.Equals(right);
1011
public bool Equals(
RuntimeMethodHandle
handle)
1809
public
RuntimeMethodHandle
GetRuntimeMethodHandleFromMetadataToken(int methodToken) { return ResolveMethodHandle(methodToken); }
1811
public
RuntimeMethodHandle
ResolveMethodHandle(int methodToken) => ResolveMethodHandle(methodToken, null, null);
1813
public
RuntimeMethodHandle
ResolveMethodHandle(int methodToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext)
1824
IRuntimeMethodInfo retVal = new RuntimeMethodInfoStub(handle,
RuntimeMethodHandle
.GetLoaderAllocator(handle));
2000
_declaringType =
RuntimeMethodHandle
.GetDeclaringType(_pMethod);
src\System\RuntimeType.CoreCLR.cs (34)
259
MethodAttributes methodAttributes =
RuntimeMethodHandle
.GetAttributes(method);
610
if (!filter.Match(
RuntimeMethodHandle
.GetUtf8Name(methodHandle)))
617
MethodAttributes methodAttributes =
RuntimeMethodHandle
.GetAttributes(methodHandle);
621
(
RuntimeMethodHandle
.GetAttributes(methodHandle) & MethodAttributes.RTSpecialName) == 0 ||
622
RuntimeMethodHandle
.GetName(methodHandle).Equals(".cctor"));
635
RuntimeMethodHandleInternal instantiatedHandle =
RuntimeMethodHandle
.GetStubIfNeeded(methodHandle, declaringType, null);
666
if (!filter.Match(
RuntimeMethodHandle
.GetUtf8Name(methodHandle)))
673
MethodAttributes methodAttributes =
RuntimeMethodHandle
.GetAttributes(methodHandle);
678
(
RuntimeMethodHandle
.GetAttributes(methodHandle) & MethodAttributes.RTSpecialName) == 0 ||
679
RuntimeMethodHandle
.GetName(methodHandle).Equals(".ctor") ||
680
RuntimeMethodHandle
.GetName(methodHandle).Equals(".cctor"));
694
methodSlot =
RuntimeMethodHandle
.GetSlot(methodHandle);
712
RuntimeMethodHandle
.GetDeclaringType(methodHandle) != declaringType);
737
RuntimeMethodHandleInternal instantiatedHandle =
RuntimeMethodHandle
.GetStubIfNeeded(methodHandle, declaringType, null);
769
if (!filter.Match(
RuntimeMethodHandle
.GetUtf8Name(methodHandle)))
773
MethodAttributes methodAttributes =
RuntimeMethodHandle
.GetAttributes(methodHandle);
792
RuntimeMethodHandleInternal instantiatedHandle =
RuntimeMethodHandle
.GetStubIfNeeded(methodHandle, declaringType, null);
1332
int slot =
RuntimeMethodHandle
.GetSlot((RuntimeMethodInfo)associateMethod);
1656
LoaderAllocator la =
RuntimeMethodHandle
.GetLoaderAllocator(genericMethod);
1659
genericMethod,
RuntimeMethodHandle
.GetDeclaringType(genericMethod), this,
1660
RuntimeMethodHandle
.GetAttributes(genericMethod), (BindingFlags)(-1), la);
1815
if (
RuntimeMethodHandle
.IsDynamicMethod(methodHandle))
1817
Resolver resolver =
RuntimeMethodHandle
.GetResolver(methodHandle);
1826
RuntimeType declaredType =
RuntimeMethodHandle
.GetDeclaringType(methodHandle);
1844
RuntimeMethodHandle
.GetName(methodHandle), MemberTypes.Constructor | MemberTypes.Method,
1895
if (!
RuntimeMethodHandle
.IsGenericMethodDefinition(methodHandle))
1897
methodInstantiation =
RuntimeMethodHandle
.GetMethodInstantiationInternal(methodHandle);
1901
methodHandle =
RuntimeMethodHandle
.GetMethodFromCanonical(methodHandle, declaredType);
1919
methodHandle =
RuntimeMethodHandle
.GetStubIfNeeded(methodHandle, declaredType, methodInstantiation);
1922
if (
RuntimeMethodHandle
.IsConstructor(methodHandle))
1930
if (
RuntimeMethodHandle
.HasMethodInstantiation(methodHandle) && !
RuntimeMethodHandle
.IsGenericMethodDefinition(methodHandle))
2774
RuntimeType reflectedType =
RuntimeMethodHandle
.GetDeclaringType(classRtMethodHandle);
3277
return GetMethodBase(
RuntimeMethodHandle
.GetDeclaringType(declaringMethod), declaringMethod);
System.Reflection.Context (3)
System\Reflection\Context\Delegation\DelegatingConstructorInfo.cs (1)
69
public override
RuntimeMethodHandle
MethodHandle
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (1)
71
public override
RuntimeMethodHandle
MethodHandle
System\Reflection\Context\Virtual\VirtualMethodBase.cs (1)
41
public override
RuntimeMethodHandle
MethodHandle
System.Reflection.Emit (4)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
56
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\ArrayMethod.cs (1)
68
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_SymbolMethod);
System\Reflection\Emit\ConstructorBuilderImpl.cs (1)
74
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System\Reflection\Emit\MethodBuilderImpl.cs (1)
253
public override
RuntimeMethodHandle
MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (1)
83
public sealed override
RuntimeMethodHandle
MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Methods\RoMethod.cs (1)
127
public sealed override
RuntimeMethodHandle
MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
713
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
RuntimeMethodHandle
))]