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