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)
1013return new RuntimeMethodHandle(methodInfo); 1881return new RuntimeMethodHandle(retVal);
158 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 (130)
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(new RuntimeMethodHandleInternal(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 (23)
944return new RuntimeMethodInfoStub(handle, RuntimeMethodHandle.GetLoaderAllocator(handle)); 957public unsafe partial struct RuntimeMethodHandle : IEquatable<RuntimeMethodHandle>, ISerializable 996if (obj is not RuntimeMethodHandle) 999RuntimeMethodHandle handle = (RuntimeMethodHandle)obj; 1005/// Returns a new <see cref="RuntimeMethodHandle"/> object created from a handle to a RuntimeMethodInfo. 1007/// <param name="value">An IntPtr handle to a RuntimeMethodInfo to create a <see cref="RuntimeMethodHandle"/> object from.</param> 1008/// <returns>A new <see cref="RuntimeMethodHandle"/> object that corresponds to the value parameter.</returns> 1009public static RuntimeMethodHandle FromIntPtr(IntPtr value) 1017/// Returns the internal pointer representation of a <see cref="RuntimeMethodHandle"/> object. 1019/// <param name="value">A <see cref="RuntimeMethodHandle"/> object to retrieve an internal pointer representation from.</param> 1020/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeMethodHandle"/> object.</returns> 1021public static IntPtr ToIntPtr(RuntimeMethodHandle value) => value.Value; 1023public static bool operator ==(RuntimeMethodHandle left, RuntimeMethodHandle right) => left.Equals(right); 1025public static bool operator !=(RuntimeMethodHandle left, RuntimeMethodHandle right) => !left.Equals(right); 1027public bool Equals(RuntimeMethodHandle handle) 1863public RuntimeMethodHandle GetRuntimeMethodHandleFromMetadataToken(int methodToken) { return ResolveMethodHandle(methodToken); } 1865public RuntimeMethodHandle ResolveMethodHandle(int methodToken) => ResolveMethodHandle(methodToken, null, null); 1867public RuntimeMethodHandle ResolveMethodHandle(int methodToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext) 1878IRuntimeMethodInfo retVal = new RuntimeMethodInfoStub(handle, RuntimeMethodHandle.GetLoaderAllocator(handle)); 2054_declaringType = RuntimeMethodHandle.GetDeclaringType(_pMethod);
src\System\RuntimeType.CoreCLR.cs (34)
259MethodAttributes methodAttributes = RuntimeMethodHandle.GetAttributes(method); 597if (!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))) 604MethodAttributes methodAttributes = RuntimeMethodHandle.GetAttributes(methodHandle); 608(RuntimeMethodHandle.GetAttributes(methodHandle) & MethodAttributes.RTSpecialName) == 0 || 609RuntimeMethodHandle.GetName(methodHandle).Equals(".cctor")); 622RuntimeMethodHandleInternal instantiatedHandle = RuntimeMethodHandle.GetStubIfNeeded(methodHandle, declaringType, null); 655if (!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))) 662MethodAttributes methodAttributes = RuntimeMethodHandle.GetAttributes(methodHandle); 667(RuntimeMethodHandle.GetAttributes(methodHandle) & MethodAttributes.RTSpecialName) == 0 || 668RuntimeMethodHandle.GetName(methodHandle).Equals(".ctor") || 669RuntimeMethodHandle.GetName(methodHandle).Equals(".cctor")); 683methodSlot = RuntimeMethodHandle.GetSlot(methodHandle); 701RuntimeMethodHandle.GetDeclaringType(methodHandle) != declaringType); 726RuntimeMethodHandleInternal instantiatedHandle = RuntimeMethodHandle.GetStubIfNeeded(methodHandle, declaringType, null); 758if (!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))) 762MethodAttributes methodAttributes = RuntimeMethodHandle.GetAttributes(methodHandle); 781RuntimeMethodHandleInternal instantiatedHandle = RuntimeMethodHandle.GetStubIfNeeded(methodHandle, declaringType, null); 1313int slot = RuntimeMethodHandle.GetSlot((RuntimeMethodInfo)associateMethod); 1637LoaderAllocator la = RuntimeMethodHandle.GetLoaderAllocator(genericMethod); 1640genericMethod, RuntimeMethodHandle.GetDeclaringType(genericMethod), this, 1641RuntimeMethodHandle.GetAttributes(genericMethod), (BindingFlags)(-1), la); 1796if (RuntimeMethodHandle.IsDynamicMethod(methodHandle)) 1798Resolver resolver = RuntimeMethodHandle.GetResolver(methodHandle); 1807RuntimeType declaredType = RuntimeMethodHandle.GetDeclaringType(methodHandle); 1825RuntimeMethodHandle.GetName(methodHandle), MemberTypes.Constructor | MemberTypes.Method, 1876if (!RuntimeMethodHandle.IsGenericMethodDefinition(methodHandle)) 1878methodInstantiation = RuntimeMethodHandle.GetMethodInstantiationInternal(methodHandle); 1882methodHandle = RuntimeMethodHandle.GetMethodFromCanonical(methodHandle, declaredType); 1900methodHandle = RuntimeMethodHandle.GetStubIfNeeded(methodHandle, declaredType, methodInstantiation); 1903if (RuntimeMethodHandle.IsConstructor(methodHandle)) 1911if (RuntimeMethodHandle.HasMethodInstantiation(methodHandle) && !RuntimeMethodHandle.IsGenericMethodDefinition(methodHandle)) 2755RuntimeType reflectedType = RuntimeMethodHandle.GetDeclaringType(classRtMethodHandle); 3258return 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)
714[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.RuntimeMethodHandle))]
System.Xaml.Tests (4)
Common\CustomConstructorInfo.cs (2)
40public Optional<RuntimeMethodHandle> MethodHandleResult { get; set; } 41public override RuntimeMethodHandle MethodHandle => MethodHandleResult.Or(DelegatingConstructor.MethodHandle);
Common\CustomMethodInfo.cs (2)
34public Optional<RuntimeMethodHandle> MethodHandleResult { get; set; } 35public override RuntimeMethodHandle MethodHandle => MethodHandleResult.Or(DelegatingMethod.MethodHandle);