3 instantiations of MethodDefinitionHandle
System.Reflection.Metadata (3)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (3)
273return new MethodDefinitionHandle(rowId); 293return new MethodDefinitionHandle(handle.RowId); 303return new MethodDefinitionHandle(handle.RowId);
383 references to MethodDefinitionHandle
BuildValidator (1)
Util.cs (1)
65var methodDef = reader.GetMethodDefinition((MethodDefinitionHandle)attribute.Constructor);
Crossgen2Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
459TypeDefinitionHandle attributeTypeDefHandle = mdReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor).GetDeclaringType(); 493foreach (var methoddefHandle in mdReader.MethodDefinitions)
Microsoft.Cci.Extensions (1)
Extensions\CSharp\CSharpCciExtensions.cs (1)
946EntityHandle handle = reader.GetMethodDefinition((MethodDefinitionHandle)ctorHandle).GetDeclaringType();
Microsoft.CodeAnalysis (103)
Compilation\Compilation.cs (4)
3049ICollection<MethodDefinitionHandle> updatedMethods, 3070ICollection<MethodDefinitionHandle> updatedMethods, 3075foreach (var token in diff.UpdatedMethods) 3430ArrayBuilder<MethodDefinitionHandle> updatedMethods,
Emit\EditAndContinue\DefinitionMap.cs (8)
135/// Gets a <see cref="MethodDefinitionHandle"/> for a given <paramref name="method"/>, 138public bool TryGetMethodHandle(IMethodSymbolInternal method, out MethodDefinitionHandle handle) 144handle = (MethodDefinitionHandle)entityHandle; 159public MethodDefinitionHandle GetPreviousMethodHandle(IMethodSymbolInternal oldMethod) 169public MethodDefinitionHandle GetPreviousMethodHandle(IMethodSymbolInternal oldMethod, out IMethodSymbolInternal? peMethod) 184return (MethodDefinitionHandle)MetadataTokens.EntityHandle(peMethod.MetadataToken); 207protected abstract ITypeSymbolInternal? TryGetStateMachineType(MethodDefinitionHandle methodHandle); 208protected abstract IMethodSymbolInternal GetMethodSymbol(MethodDefinitionHandle methodHandle);
Emit\EditAndContinue\DeletedPEMethodDefinition.cs (1)
35public MethodDefinitionHandle MetadataHandle
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (3)
17private readonly MethodDefinitionHandle _handle; 21public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 29public MethodDefinitionHandle MetadataHandle
Emit\EditAndContinue\DeltaMetadataWriter.cs (10)
60private readonly Dictionary<MethodDefinitionHandle, int> _firstParamRowMap; 120_firstParamRowMap = new Dictionary<MethodDefinitionHandle, int>(); 277public void GetUpdatedMethodTokens(ArrayBuilder<MethodDefinitionHandle> methods) 357protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 364protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 367protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle index) 393protected override MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef) 749var handle = GetMethodDefinitionHandle(methodDef); 772private void EmitParametersFromOriginalMetadata(IMethodDefinition methodDef, MethodDefinitionHandle handle) 789private void EmitParametersFromDelta(IMethodDefinition methodDef, MethodDefinitionHandle handle)
Emit\EditAndContinue\EmitBaseline.cs (15)
84public static EmitBaseline CreateInitialBaseline(ModuleMetadata module, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider) 91Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 92Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 141Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 142Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 181firstParamRowMap: new Dictionary<MethodDefinitionHandle, int>(), 239internal readonly IReadOnlyDictionary<MethodDefinitionHandle, int> FirstParamRowMap; 269internal readonly Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> DebugInformationProvider; 278internal readonly Func<MethodDefinitionHandle, StandaloneSignatureHandle> LocalSignatureProvider; 302IReadOnlyDictionary<MethodDefinitionHandle, int> firstParamRowMap, 317Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 318Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 401IReadOnlyDictionary<MethodDefinitionHandle, int> firstParamRowMap, 416Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 417Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider)
Emit\EditAndContinue\EmitDifferenceResult.cs (2)
17public ImmutableArray<MethodDefinitionHandle> UpdatedMethods { get; } 24internal EmitDifferenceResult(bool success, ImmutableArray<Diagnostic> diagnostics, EmitBaseline? baseline, ImmutableArray<MethodDefinitionHandle> updatedMethods, ImmutableArray<TypeDefinitionHandle> changedTypes)
Emit\EditAndContinue\IDeletedMethodDefinition.cs (1)
11public MethodDefinitionHandle MetadataHandle { get; }
MetadataReader\MetadataDecoder.cs (11)
1205internal ParamInfo<TypeSymbol>[] GetSignatureForMethod(MethodDefinitionHandle methodDef, out SignatureHeader signatureHeader, out BadImageFormatException metadataException, bool setParamHandles = true) 1253internal void DecodeMethodSignatureParameterCountsOrThrow(MethodDefinitionHandle methodDef, out int parameterCount, out int typeParameterCount) 1257internal static void GetSignatureCountsOrThrow(PEModule module, MethodDefinitionHandle methodDef, out int parameterCount, out int typeParameterCount) 1899internal ImmutableArray<MethodSymbol> GetExplicitlyOverriddenMethods(TypeDefinitionHandle implementingTypeDef, MethodDefinitionHandle implementingMethodDef, TypeSymbol implementingTypeSymbol) 1934methodSymbol = FindMethodSymbolInSuperType(implementingTypeDef, (MethodDefinitionHandle)implementedMethodHandle); 1966private MethodSymbol FindMethodSymbolInSuperType(TypeDefinitionHandle searchTypeDef, MethodDefinitionHandle targetMethodDef) 1997foreach (MethodDefinitionHandle methodDef in Module.GetMethodsOfTypeOrThrow(typeDef)) 2089protected abstract MethodSymbol FindMethodSymbolInType(TypeSymbol type, MethodDefinitionHandle methodDef); 2130protected abstract MethodDefinitionHandle GetMethodHandle(MethodSymbol method); 2185TypeDefinitionHandle typeDef = Module.FindContainingTypeOrThrow((MethodDefinitionHandle)token); 2287? FindMethodSymbolInType(container, (MethodDefinitionHandle)memberToken)
MetadataReader\ModuleExtensions.cs (2)
60public static bool ShouldImportMethod(this PEModule module, TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef, MetadataImportOptions importOptions) 119bool isMethodImpl(TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef)
MetadataReader\PEModule.cs (13)
2048internal bool HasStateMachineAttribute(MethodDefinitionHandle handle, out string stateMachineTypeName) 3093var methodDef = metadataReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor); 3318internal string GetMethodDefNameOrThrow(MethodDefinitionHandle methodDef) 3324internal BlobHandle GetMethodSignatureOrThrow(MethodDefinitionHandle methodDef) 3330private static BlobHandle GetMethodSignatureOrThrow(MetadataReader metadataReader, MethodDefinitionHandle methodDef) 3347return GetMethodSignatureOrThrow(metadataReader, (MethodDefinitionHandle)methodDefOrRef); 3358public MethodAttributes GetMethodDefFlagsOrThrow(MethodDefinitionHandle methodDef) 3364internal TypeDefinitionHandle FindContainingTypeOrThrow(MethodDefinitionHandle methodDef) 3383MethodDefinitionHandle methodDef, 3409internal GenericParameterHandleCollection GetGenericParametersForMethodOrThrow(MethodDefinitionHandle methodDef) 3415internal ParameterHandleCollection GetParametersOfMethodOrThrow(MethodDefinitionHandle methodDef) 3420internal DllImportData GetDllImportData(MethodDefinitionHandle methodDef) 3979internal MethodBodyBlock GetMethodBodyOrThrow(MethodDefinitionHandle methodHandle)
NativePdbWriter\PdbWriter.cs (2)
69var methodHandle = (MethodDefinitionHandle)_metadataWriter.GetMethodHandle(methodBody.MethodDefinition);
PEWriter\CustomDebugInfoWriter.cs (4)
23private MethodDefinitionHandle _methodWithModuleInfo; 26private MethodDefinitionHandle _previousMethodWithUsingInfo; 42public bool ShouldForwardNamespaceScopes(EmitContext context, IMethodBody methodBody, MethodDefinitionHandle methodHandle, out IMethodDefinition forwardToMethod) 69MethodDefinitionHandle methodHandle,
PEWriter\ExtendedPEBuilder.cs (1)
41MethodDefinitionHandle entryPoint,
PEWriter\FullMetadataWriter.cs (4)
172protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 180protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 185protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle handle) 225protected override MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef)
PEWriter\MetadataWriter.cs (14)
217protected abstract bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle); 222protected abstract MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def); 228protected abstract IMethodDefinition GetMethodDef(MethodDefinitionHandle handle); 272protected abstract MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef); 944MethodDefinitionHandle methodHandle; 1170MethodDefinitionHandle methodDefHandle; 1757debugEntryPoint: default(MethodDefinitionHandle), 1865public PortablePdbBuilder GetPortablePdbBuilder(ImmutableArray<int> typeSystemRowCounts, MethodDefinitionHandle debugEntryPoint, Func<IEnumerable<Blob>, BlobContentId> deterministicIdProviderOpt) 1870internal void GetEntryPoints(out MethodDefinitionHandle entryPointHandle, out MethodDefinitionHandle debugEntryPointHandle) 1876entryPointHandle = entryPoint != null ? (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)entryPoint.AsDefinition(Context)) : default(MethodDefinitionHandle); 1882debugEntryPointHandle = (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)debugEntryPoint.AsDefinition(Context)); 1891entryPointHandle = debugEntryPointHandle = default(MethodDefinitionHandle);
PEWriter\MetadataWriter.PortablePdb.cs (4)
68var methodHandle = MetadataTokens.MethodDefinitionHandle(methodRid); 578private void SerializeAsyncMethodSteppingInfo(AsyncMoveNextBodyDebugInfo asyncInfo, MethodDefinitionHandle moveNextMethod, int aggregateMethodDefRid) 600private void SerializeStateMachineLocalScopes(IMethodBody methodBody, MethodDefinitionHandle method) 806private void SerializeEncMethodDebugInformation(IMethodBody methodBody, MethodDefinitionHandle method)
PEWriter\PeWriter.cs (2)
119MethodDefinitionHandle entryPointHandle; 120MethodDefinitionHandle debugEntryPointHandle;
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
69public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle) 77public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
Microsoft.CodeAnalysis.CSharp (23)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
131protected override ITypeSymbolInternal? TryGetStateMachineType(MethodDefinitionHandle methodHandle) 134protected override IMethodSymbolInternal GetMethodSymbol(MethodDefinitionHandle methodHandle)
Emitter\EditAndContinue\EmitHelpers.cs (1)
120var updatedMethods = ArrayBuilder<MethodDefinitionHandle>.GetInstance();
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
171foreach (var methodHandle in def.GetMethods())
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
133var methodDef = (MethodDefinitionHandle)memberRefOrMethodDef;
Symbols\Metadata\PE\MetadataDecoder.cs (3)
488protected override MethodSymbol FindMethodSymbolInType(TypeSymbol typeSymbol, MethodDefinitionHandle targetMethodDef) 602protected override MethodDefinitionHandle GetMethodHandle(MethodSymbol method) 610return default(MethodDefinitionHandle);
Symbols\Metadata\PE\PEMethodSymbol.cs (3)
380private readonly MethodDefinitionHandle _handle; 404MethodDefinitionHandle methodDef) 554internal MethodDefinitionHandle Handle => _handle;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (11)
802foreach (var methodDef in module.GetMethodsOfTypeOrThrow(_handle)) 1119var methodDefs = ArrayBuilder<MethodDefinitionHandle>.GetInstance(); 1123foreach (var methodDef in module.GetMethodsOfTypeOrThrow(_handle)) 1362PooledDictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol = this.CreateMethods(nonFieldMembers); 2002private PooledDictionary<MethodDefinitionHandle, PEMethodSymbol> CreateMethods(ArrayBuilder<Symbol> members) 2006var map = PooledDictionary<MethodDefinitionHandle, PEMethodSymbol>.GetInstance(); 2013foreach (var methodHandle in module.GetMethodsOfTypeOrThrow(_handle)) 2029private void CreateProperties(Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, ArrayBuilder<Symbol> members) 2060Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, 2093private PEMethodSymbol GetAccessorMethod(PEModule module, Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenAsyncMainTests.cs (3)
721var main = metadataReader.MethodDefinitions.Where(mh => getMethodName(mh) == "<Main>").Single(); 724string getMethodName(MethodDefinitionHandle handle) 727IEnumerable<string> getMethodAttributes(MethodDefinitionHandle handle)
CodeGen\CodeGenFunctionPointersTests.cs (2)
12709var mMethodDef = metadata.AddMethodDefinition( 12717var ctorDef = metadata.AddMethodDefinition(
CodeGen\DestructorTests.cs (1)
782MethodDefinitionHandle handleDestructorA = typeA.GetMethods().AsEnumerable().
Emit\CompilationEmitTests.cs (1)
5081foreach (var m in typeDef.GetMethods())
Emit\NoPiaEmbedTypes.cs (1)
1463MethodDefinitionHandle gapMethodDef = metadata.GetMethodsOfTypeOrThrow(itest17.Handle).AsEnumerable().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (7)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
74var updatedMethods = new List<MethodDefinitionHandle>(); 146var updatedMethods = new List<MethodDefinitionHandle>();
Emit\EditAndContinue\EditAndContinueTestBase.cs (3)
35internal static readonly Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> EmptyLocalsProvider = handle => default(EditAndContinueMethodDebugInformation); 44public static EmitBaseline CreateInitialBaseline(Compilation compilation, ModuleMetadata module, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider) 218public static void CheckNames(IReadOnlyList<MetadataReader> readers, ImmutableArray<MethodDefinitionHandle> methodHandles, params string[] expectedNames)
PDB\PDBTests.cs (1)
687var methodDef = mdReader.GetMethodDefinition((MethodDefinitionHandle)MetadataTokens.Handle(peEntryPointToken));
PDB\PortablePdbTests.cs (1)
53foreach (var methodHandle in mdReader.MethodDefinitions)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Attributes\AttributeTests_WellKnownAttributes.cs (8)
60foreach (var methodHandle in typeDef.GetMethods()) 1146foreach (var methodHandle in metadataReader.MethodDefinitions) 2717MethodDefinitionHandle[] methodDefs = metadataReader.MethodDefinitions.AsEnumerable().ToArray(); 3073foreach (var methodHandle in peReader.MethodDefinitions) 3147foreach (var methodHandle in metadataReader.MethodDefinitions) 3282foreach (var methodHandle in peReader.MethodDefinitions) 4734foreach (var methodHandle in metadataReader.MethodDefinitions) 10722foreach (var methodHandle in typeC.GetMethods())
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
EmitMetadataTestBase.cs (1)
150name = metadataReader.GetString(metadataReader.GetMethodDefinition((MethodDefinitionHandle)token).Name);
Microsoft.CodeAnalysis.Debugging.Package (2)
CustomDebugInfoEncoder.cs (2)
69public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle) 77public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (7)
MetadataUtilities.cs (1)
482foreach (var handle in reader.MethodDefinitions)
PDB\MethodDebugInfo.Portable.cs (6)
34var methodHandle = GetDeltaRelativeMethodDefinitionHandle(reader, methodToken); 93private static MethodDefinitionHandle GetDeltaRelativeMethodDefinitionHandle(MetadataReader reader, int methodToken) 95var globalHandle = (MethodDefinitionHandle)MetadataTokens.EntityHandle(methodToken); 124MethodDefinitionHandle methodHandle, 387MethodDefinitionHandle methodHandle,
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (4)
MetadataResolver.cs (4)
67foreach (var methodHandle in typeDef.GetMethods()) 226MethodDefinitionHandle primaryAccessorHandle, 349MethodDefinitionHandle handle) 357MethodDefinitionHandle handle)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
40private static string GetMethodSignature(MetadataReader reader, MethodDefinitionHandle handle)
Microsoft.CodeAnalysis.Features (14)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (7)
31public abstract EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle); 32public abstract StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle); 57public override StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle) 65public override EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle) 118public override StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle) 121public override EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle) 127private ImmutableArray<byte> GetCdiBytes(MethodDefinitionHandle methodHandle, Guid kind)
PdbSourceDocument\SymbolSourceDocumentFinder.cs (5)
21ProcessMethodDef((MethodDefinitionHandle)handle, dllReader, pdbReader, docList, processDeclaringType: true); 40private static void ProcessMethodDef(MethodDefinitionHandle methodDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList, bool processDeclaringType) 91foreach (var other in accessors.Others) 111foreach (var other in accessors.Others) 130foreach (var methodDefHandle in typeDef.GetMethods())
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
69public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle) 77public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\CompilationDifference.cs (1)
86MethodDefinitionHandle methodToken = default,
Compilation\CompilationTestDataExtensions.cs (1)
115internal static Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> EncDebugInfoProvider(this CompilationTestData.MethodData methodData)
CompilationVerifier.cs (1)
423static string printMethod(MethodDefinitionHandle method, MetadataReader metadataReader)
Metadata\MetadataReaderUtils.cs (3)
226parent = reader.GetMethodDefinition((MethodDefinitionHandle)token).GetDeclaringType(); 350MethodDefinition method = reader.GetMethodDefinition((MethodDefinitionHandle)handle); 488foreach (var method in metadataReader.MethodDefinitions)
Metadata\MetadataValidation.cs (2)
38var container = metadataReader.GetMethodDefinition((MethodDefinitionHandle)ctorHandle).GetDeclaringType(); 106foreach (var methodHandle in metadataReader.MethodDefinitions)
Microsoft.CodeAnalysis.UnitTests (2)
Emit\EmitBaselineTests.cs (2)
22var debugInfoProvider = new Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>(_ => default); 23var localSigProvider = new Func<MethodDefinitionHandle, StandaloneSignatureHandle>(_ => default);
Microsoft.CodeAnalysis.VisualBasic (19)
Emit\EditAndContinue\EmitHelpers.vb (3)
45updatedMethods:=ImmutableArray(Of MethodDefinitionHandle).Empty, 100updatedMethods:=ImmutableArray(Of MethodDefinitionHandle).Empty, 109Dim updatedMethods = ArrayBuilder(Of MethodDefinitionHandle).GetInstance()
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (2)
86Protected Overrides Function TryGetStateMachineType(methodHandle As MethodDefinitionHandle) As ITypeSymbolInternal 95Protected Overrides Function GetMethodSymbol(methodHandle As MethodDefinitionHandle) As IMethodSymbolInternal
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (1)
110Dim methodDef = CType(memberRefOrMethodDef, MethodDefinitionHandle)
Symbols\Metadata\PE\MetadataDecoder.vb (2)
421Protected Overrides Function FindMethodSymbolInType(typeSymbol As TypeSymbol, targetMethodDef As MethodDefinitionHandle) As MethodSymbol 509Protected Overrides Function GetMethodHandle(method As MethodSymbol) As MethodDefinitionHandle
Symbols\Metadata\PE\PEMethodSymbol.vb (3)
29Private ReadOnly _handle As MethodDefinitionHandle 278handle As MethodDefinitionHandle 802Friend ReadOnly Property Handle As MethodDefinitionHandle
Symbols\Metadata\PE\PENamedTypeSymbol.vb (8)
557Dim methodDefs = ArrayBuilder(Of MethodDefinitionHandle).GetInstance() 665Dim methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol) = CreateMethods() 1216Private Function CreateMethods() As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol) 1217Dim methods = New Dictionary(Of MethodDefinitionHandle, PEMethodSymbol)() 1233Private Sub CreateProperties(methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), members As ArrayBuilder(Of Symbol)) 1255Private Sub CreateEvents(methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), members As ArrayBuilder(Of Symbol)) 1280Private Shared Function GetAccessorMethod(moduleSymbol As PEModuleSymbol, methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), typeDef As TypeDefinitionHandle, methodDef As MethodDefinitionHandle) As PEMethodSymbol
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (7)
Attributes\AttributeTests_WellKnownAttributes.vb (3)
1522Dim methodDefs As MethodDefinitionHandle() = reader.MethodDefinitions.AsEnumerable().ToArray() 2454Dim map As New Dictionary(Of String, MethodDefinitionHandle)() 2782Dim methodDefs As MethodDefinitionHandle() = reader.MethodDefinitions.AsEnumerable().ToArray()
Emit\CompilationEmitTests.vb (1)
2603Private Shared Function GetTokenForMethod(metadataReader As MetadataReader, methodName As String) As MethodDefinitionHandle
Emit\EditAndContinue\EditAndContinueTestBase.vb (2)
30Friend Shared ReadOnly EmptyLocalsProvider As Func(Of MethodDefinitionHandle, EditAndContinueMethodDebugInformation) = Function(token) Nothing 39Public Shared Function CreateInitialBaseline(compilation As Compilation, [module] As ModuleMetadata, debugInformationProvider As Func(Of MethodDefinitionHandle, EditAndContinueMethodDebugInformation)) As EmitBaseline
PDB\PDBTests.vb (1)
155Dim methodDef = mdReader.GetMethodDefinition(CType(MetadataTokens.Handle(peEntryPointToken), MethodDefinitionHandle))
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (6)
CompilationExtensions.vb (2)
29Friend Function GetSourceMethod(compilation As VisualBasicCompilation, moduleId As ModuleId, methodHandle As MethodDefinitionHandle) As PEMethodSymbol 50Friend Function GetMethod(compilation As VisualBasicCompilation, moduleId As ModuleId, methodHandle As MethodDefinitionHandle) As PEMethodSymbol
EvaluationContext.vb (3)
154Dim methodHandle = CType(MetadataTokens.Handle(methodToken), MethodDefinitionHandle) 511methodHandle As MethodDefinitionHandle, 534Private Shared Function GetMethodSignatureString(metadataDecoder As MetadataDecoder, methodHandle As MethodDefinitionHandle) As String
VisualBasicInstructionDecoder.vb (1)
117Dim methodHandle = CType(MetadataTokens.Handle(instructionAddress.MethodId.Token), MethodDefinitionHandle)
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
431foreach (var child in typeDefinition.GetMethods())
Microsoft.DotNet.SignTool (1)
src\Configuration.cs (1)
694var typeDef = reader.GetTypeDefinition(reader.GetMethodDefinition((MethodDefinitionHandle)ctorHandle).GetDeclaringType());
Roslyn.Test.PdbUtilities (9)
EditAndContinue\EditAndContinueTest.cs (1)
38internal TSelf AddBaseline(string source, Action<GenerationVerifier>? validator = null, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation>? debugInformationProvider = null)
EditAndContinue\EditAndContinueTestUtilities.cs (4)
19public static EmitBaseline CreateInitialBaseline(Compilation compilation, ModuleMetadata module, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider) 21var localSignatureProvider = new Func<MethodDefinitionHandle, StandaloneSignatureHandle>(methodHandle => 98public static void CheckNames(IReadOnlyList<MetadataReader> readers, ImmutableArray<MethodDefinitionHandle> methodHandles, params string[] expectedNames) 99=> CheckNames(readers, methodHandles, (reader, handle) => reader.GetMethodDefinition((MethodDefinitionHandle)handle).Name, handle => handle, expectedNames);
Reader\CustomDebugInfoUtilities.cs (1)
19public static byte[] GetCustomDebugInfoBytes(ISymUnmanagedReader3 reader, MethodDefinitionHandle handle, int methodVersion)
Reader\PdbTestUtilities.cs (1)
32public static unsafe EditAndContinueMethodDebugInformation GetEncMethodDebugInfo(this ISymUnmanagedReader3 symReader, MethodDefinitionHandle handle)
Reader\PdbValidation.cs (2)
91public static void VerifyPdb(this CompilationDifference diff, IEnumerable<MethodDefinitionHandle> methodHandles, string expectedPdb) 96public static void VerifyPdb(this CompilationDifference diff, IEnumerable<MethodDefinitionHandle> methodHandles, XElement expectedPdb)
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
446foreach (var handle in metadataReader.MethodDefinitions)
System.Diagnostics.FileVersionInfo (2)
System\Diagnostics\FileVersionInfo.Unix.cs (2)
271MethodDefinition md = reader.GetMethodDefinition((MethodDefinitionHandle)ctorHandle); 298signature = reader.GetMethodDefinition((MethodDefinitionHandle)ctorHandle).Signature;
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
67MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle();
System.Reflection.Emit (7)
System\Reflection\Emit\MethodBuilderImpl.cs (1)
36internal MethodDefinitionHandle _handle;
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
367MethodDefinitionHandle handle = AddMethodDefinition(method, method.GetMethodSignatureBlob(), offset, _nextParameterRowId); 413private void AddSymbolInfo(ILGeneratorImpl il, StandaloneSignatureHandle localSignatureHandle, MethodDefinitionHandle methodHandle) 513private void AddLocalScope(MethodDefinitionHandle methodHandle, ImportScopeHandle parentImport, LocalVariableHandle firstLocalVariableHandle, Scope scope) 899private void AddMethodSemantics(EntityHandle parentHandle, MethodSemanticsAttributes attribute, MethodDefinitionHandle methodHandle) => 942private MethodDefinitionHandle AddMethodDefinition(MethodBuilderImpl method, BlobBuilder methodSignature, int offset, int parameterToken) => 963private void AddMethodImport(MethodDefinitionHandle methodHandle, string name,
System.Reflection.Metadata (118)
System\Reflection\Metadata\Ecma335\CodedIndex.cs (7)
12/// <see cref="MethodDefinitionHandle"/>, 48/// <param name="handle"><see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/></param> 55/// <param name="handle"><see cref="TypeDefinitionHandle"/>, <see cref="MethodDefinitionHandle"/>, or <see cref="AssemblyDefinitionHandle"/></param> 94/// <see cref="MethodDefinitionHandle"/>, or 103/// <param name="handle"><see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/></param> 131/// <param name="handle"><see cref="TypeDefinitionHandle"/> or <see cref="MethodDefinitionHandle"/></param> 139/// <see cref="MethodDefinitionHandle"/>,
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (1)
29MethodDefinition definition = _reader.GetMethodDefinition((MethodDefinitionHandle)constructor);
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (1)
116public void Call(MethodDefinitionHandle methodHandle)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (17)
466MethodDefinitionHandle methodList) 693public void AddMethodSemantics(EntityHandle association, MethodSemanticsAttributes semantics, MethodDefinitionHandle methodDefinition) 714/// <see cref="MethodDefinitionHandle"/>, 738/// Custom attribute constructor: <see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/> 768/// <param name="method">Generic method: <see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/></param> 819/// <param name="parent">Parent entity handle: <see cref="TypeDefinitionHandle"/> or <see cref="MethodDefinitionHandle"/></param> 985public MethodDefinitionHandle AddMethodDefinition( 1008return MethodDefinitionHandle.FromRowId(_methodDefTable.Count); 1022MethodDefinitionHandle method, 1040/// <param name="methodBody"><see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/> which provides the implementation.</param> 1041/// <param name="methodDeclaration"><see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/> the method being implemented.</param> 1068/// <see cref="MethodDefinitionHandle"/>, or 1160/// <param name="parent"><see cref="TypeDefinitionHandle"/>, <see cref="MethodDefinitionHandle"/>, or <see cref="AssemblyDefinitionHandle"/></param> 1274public LocalScopeHandle AddLocalScope(MethodDefinitionHandle method, ImportScopeHandle importScope, LocalVariableHandle variableList, LocalConstantHandle constantList, int startOffset, int length) 1357public void AddStateMachineMethod(MethodDefinitionHandle moveNextMethod, MethodDefinitionHandle kickoffMethod) 1371/// <see cref="MethodDefinitionHandle"/>,
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (2)
345public static MethodDefinitionHandle MethodDefinitionHandle(int rowNumber) 347return Metadata.MethodDefinitionHandle.FromRowId(ToRowId(rowNumber));
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
19private readonly MethodDefinitionHandle _entryPoint; 50MethodDefinitionHandle entryPoint,
System\Reflection\Metadata\EntityHandle.cs (1)
72/// Value stored in a specific entity handle (see <see cref="TypeDefinitionHandle"/>, <see cref="MethodDefinitionHandle"/>, etc.).
System\Reflection\Metadata\Handle.cs (1)
98/// Value stored in a concrete entity handle (see <see cref="TypeDefinitionHandle"/>, <see cref="MethodDefinitionHandle"/>, etc.).
System\Reflection\Metadata\Internal\MemberForwardedTag.cs (1)
34internal static uint ConvertMethodDefToTag(MethodDefinitionHandle methodDef)
System\Reflection\Metadata\Internal\Tables.cs (11)
391internal MethodDefinitionHandle GetMethodFor(int rowId) 394return MethodDefinitionHandle.FromRowId(this.Block.PeekReference(rowOffset + _MethodOffset, _IsMethodTableRowRefSizeSmall)); 447internal BlobHandle GetSignature(MethodDefinitionHandle handle) 453internal int GetRva(MethodDefinitionHandle handle) 459internal StringHandle GetName(MethodDefinitionHandle handle) 465internal MethodAttributes GetFlags(MethodDefinitionHandle handle) 471internal MethodImplAttributes GetImplFlags(MethodDefinitionHandle handle) 1507internal MethodDefinitionHandle GetMethod(int rowId) 1510return MethodDefinitionHandle.FromRowId(this.Block.PeekReference(rowOffset + _MethodOffset, _IsMethodTableRowRefSizeSmall)); 1768internal int FindImplForMethod(MethodDefinitionHandle methodDef) 2495internal GenericParameterHandleCollection FindGenericParametersForMethod(MethodDefinitionHandle methodDef)
System\Reflection\Metadata\Internal\TypeOrMethodDefTag.cs (1)
39internal static uint ConvertMethodDefToTag(MethodDefinitionHandle methodDef)
System\Reflection\Metadata\MetadataReader.cs (7)
556MethodDefinitionHandle.FromRowId(entryPointRowId), 921internal void GetParameterRange(MethodDefinitionHandle methodDef, out int firstParamRowId, out int lastParamRowId) 1207public MethodDefinition GetMethodDefinition(MethodDefinitionHandle handle) 1213private uint GetMethodDefTreatmentAndRowId(MethodDefinitionHandle handle) 1323internal TypeDefinitionHandle GetDeclaringType(MethodDefinitionHandle methodDef) 1388public MethodDebugInformation GetMethodDebugInformation(MethodDefinitionHandle handle) 1423public LocalScopeHandleCollection GetLocalScopes(MethodDefinitionHandle handle)
System\Reflection\Metadata\MetadataReader.WinMD.cs (3)
390private uint CalculateMethodDefTreatmentAndRowId(MethodDefinitionHandle methodDef) 501private MethodDefTreatment GetMethodTreatmentFromCustomAttributes(MethodDefinitionHandle methodDef) 801return GetDeclaringType((MethodDefinitionHandle)ctor);
System\Reflection\Metadata\PortablePdb\DebugMetadataHeader.cs (2)
11public MethodDefinitionHandle EntryPoint { get; } 18internal DebugMetadataHeader(ImmutableArray<byte> id, MethodDefinitionHandle entryPoint, int idStartOffset)
System\Reflection\Metadata\PortablePdb\HandleCollections.Debug.cs (1)
319private readonly MethodDefinitionHandle _parentMethodRowId;
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (2)
182public MethodDefinitionHandle ToDefinitionHandle() 184return MethodDefinitionHandle.FromRowId(_rowId);
System\Reflection\Metadata\PortablePdb\LocalScope.cs (1)
32public MethodDefinitionHandle Method => _reader.LocalScopeTable.GetMethod(_rowId);
System\Reflection\Metadata\PortablePdb\MethodDebugInformation.cs (1)
70public MethodDefinitionHandle GetStateMachineKickoffMethod()
System\Reflection\Metadata\PortablePdb\Tables.Debug.cs (6)
160internal MethodDefinitionHandle GetMethod(int rowId) 163return MethodDefinitionHandle.FromRowId(Block.PeekReference(rowOffset + MethodOffset, _isMethodRefSmall)); 360internal MethodDefinitionHandle FindKickoffMethod(int moveNextMethodRowId) 372return default(MethodDefinitionHandle); 378private MethodDefinitionHandle GetKickoffMethod(int rowId) 381return MethodDefinitionHandle.FromRowId(Block.PeekReference(rowOffset + _kickoffMethodOffset, _isMethodRefSizeSmall));
System\Reflection\Metadata\TypeSystem\CustomAttribute.cs (1)
41/// The constructor (<see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/>) of the custom attribute type.
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (3)
73ImmutableArray<MethodDefinitionHandle>.Builder? other = null; 95other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>(); 102var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\Metadata\TypeSystem\GenericParameter.cs (1)
30/// <see cref="TypeDefinitionHandle"/> or <see cref="MethodDefinitionHandle"/>.
System\Reflection\Metadata\TypeSystem\HandleCollections.TypeSystem.cs (24)
455public readonly struct MethodDefinitionHandleCollection : IReadOnlyCollection<MethodDefinitionHandle> 492IEnumerator<MethodDefinitionHandle> IEnumerable<MethodDefinitionHandle>.GetEnumerator() 502public struct Enumerator : IEnumerator<MethodDefinitionHandle>, IEnumerator 521public MethodDefinitionHandle Current 533return MethodDefinitionHandle.FromRowId((int)(_currentRowId & TokenTypeIds.RIDMask)); 538private MethodDefinitionHandle GetCurrentMethodIndirect() 1045internal ParameterHandleCollection(MetadataReader reader, MethodDefinitionHandle containingMethod) 1614private readonly ImmutableArray<MethodDefinitionHandle> _others; 1616public MethodDefinitionHandle Getter { get { return MethodDefinitionHandle.FromRowId(_getterRowId); } } 1617public MethodDefinitionHandle Setter { get { return MethodDefinitionHandle.FromRowId(_setterRowId); } } 1618public ImmutableArray<MethodDefinitionHandle> Others { get { return _others; } } 1620internal PropertyAccessors(int getterRowId, int setterRowId, ImmutableArray<MethodDefinitionHandle> others) 1635private readonly ImmutableArray<MethodDefinitionHandle> _others; 1637public MethodDefinitionHandle Adder { get { return MethodDefinitionHandle.FromRowId(_adderRowId); } } 1638public MethodDefinitionHandle Remover { get { return MethodDefinitionHandle.FromRowId(_removerRowId); } } 1639public MethodDefinitionHandle Raiser { get { return MethodDefinitionHandle.FromRowId(_raiserRowId); } } 1640public ImmutableArray<MethodDefinitionHandle> Others { get { return _others; } } 1642internal EventAccessors(int adderRowId, int removerRowId, int raiserRowId, ImmutableArray<MethodDefinitionHandle> others)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (13)
259public readonly struct MethodDefinitionHandle : IEquatable<MethodDefinitionHandle> 271internal static MethodDefinitionHandle FromRowId(int rowId) 276public static implicit operator Handle(MethodDefinitionHandle handle) 281public static implicit operator EntityHandle(MethodDefinitionHandle handle) 286public static explicit operator MethodDefinitionHandle(Handle handle) 296public static explicit operator MethodDefinitionHandle(EntityHandle handle) 316public static bool operator ==(MethodDefinitionHandle left, MethodDefinitionHandle right) 323return obj is MethodDefinitionHandle && ((MethodDefinitionHandle)obj)._rowId == _rowId; 326public bool Equals(MethodDefinitionHandle other) 336public static bool operator !=(MethodDefinitionHandle left, MethodDefinitionHandle right)
System\Reflection\Metadata\TypeSystem\MethodDefinition.cs (2)
35private MethodDefinitionHandle Handle 37get { return MethodDefinitionHandle.FromRowId(RowId); }
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (3)
84ImmutableArray<MethodDefinitionHandle>.Builder? other = null; 102other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>(); 109var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (3)
30private readonly MethodDefinitionHandle _entryPointOpt; 46MethodDefinitionHandle entryPoint = default(MethodDefinitionHandle),
System.Reflection.MetadataLoadContext (19)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs (2)
64MethodDefinitionHandle mh = (MethodDefinitionHandle)ctorHandle;
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (2)
87MethodDefinitionHandle mh = (MethodDefinitionHandle)ctorHandle;
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (1)
66ImmutableArray<MethodDefinitionHandle> others = EventDefinition.GetAccessors().Others;
System\Reflection\TypeLoading\General\Ecma\EcmaHelpers.cs (2)
118public static RoMethod? ToMethodOrNull(this MethodDefinitionHandle handle, RoInstantiationProviderType declaringType, Type reflectedType) 126public static RoMethod ToMethod(this MethodDefinitionHandle handle, RoInstantiationProviderType declaringType, Type reflectedType)
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (1)
180public static T ResolveMethod<T>(this MethodDefinitionHandle handle, EcmaModule module, in TypeContext typeContext) where T : MethodBase
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (4)
36public static LocalScopeHandleCollection GetLocalScopes(this MethodDefinitionHandle handle, MetadataReader reader) => reader.GetLocalScopes(handle); 42public static MethodDebugInformation GetMethodDebugInformation(this MethodDefinitionHandle handle, MetadataReader reader) => reader.GetMethodDebugInformation(handle); 43public static MethodDefinition GetMethodDefinition(this MethodDefinitionHandle handle, MetadataReader reader) => reader.GetMethodDefinition(handle); 68public static int GetToken(this MethodDefinitionHandle handle) => MetadataTokens.GetToken(handle);
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (2)
13private readonly MethodDefinitionHandle _handle; 16internal EcmaMethodDecoder(MethodDefinitionHandle handle, EcmaModule module)
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (2)
67MethodDefinitionHandle mdh = (MethodDefinitionHandle)handle;
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.BindingFlags.cs (2)
21foreach (MethodDefinitionHandle handle in TypeDefinition.GetMethods()) 35foreach (MethodDefinitionHandle handle in TypeDefinition.GetMethods())
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericMethodParameterType.cs (1)
27private RoMethod ComputeDeclaringMethod() => ((MethodDefinitionHandle)(GenericParameter.Parent)).ResolveMethod<RoMethod>(GetEcmaModule(), default);