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);
396 references to MethodDefinitionHandle
Crossgen2Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
542TypeDefinitionHandle attributeTypeDefHandle = mdReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor).GetDeclaringType(); 576foreach (var methoddefHandle in mdReader.MethodDefinitions)
ILAssembler (9)
EntityRegistry.cs (5)
272(MethodDefinitionHandle)methodDef.Handle, 350builder.AddMethodSemantics(evt.Handle, accessor.Semantic, (MethodDefinitionHandle)accessor.Method.Handle); 363builder.AddMethodSemantics(prop.Handle, accessor.Semantic, (MethodDefinitionHandle)accessor.Method.Handle); 463static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 464=> (MethodDefinitionHandle)GetHandleForList(list, listOwner, getList, ownerIndex, TableIndex.MethodDef);
GrammarVisitor.cs (3)
202MethodDefinitionHandle entryPoint = default; 205entryPoint = (MethodDefinitionHandle)_entityRegistry.EntryPoint.Handle; 316private DebugDirectoryBuilder? BuildDebugDirectory(MethodDefinitionHandle entryPoint, out int debugDataSize)
VTableExportPEBuilder.cs (1)
94MethodDefinitionHandle entryPoint = default,
ILCompiler.Compiler (11)
Compiler\DependencyAnalysis\CustomAttributeBasedDependencyAlgorithm.cs (1)
34MethodDefinitionHandle methodHandle = method.Handle;
Compiler\DependencyAnalysis\MethodMetadataNode.cs (1)
99MethodDefinitionHandle methodHandle = _method.Handle;
Compiler\UnmanagedEntryPointsRootProvider.cs (2)
40var parent = (MethodDefinitionHandle)ca.Parent;
src\runtime\src\coreclr\tools\Common\Compiler\EventPseudoDesc.cs (3)
27MethodDefinitionHandle adder = Definition.GetAccessors().Adder; 36MethodDefinitionHandle setter = Definition.GetAccessors().Remover; 45MethodDefinitionHandle raiser = Definition.GetAccessors().Raiser;
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (1)
185foreach (MethodDefinitionHandle methodHandle in typeDefinition.GetMethods())
src\runtime\src\coreclr\tools\Common\Compiler\PropertyPseudoDesc.cs (2)
31MethodDefinitionHandle getter = Definition.GetAccessors().Getter; 40MethodDefinitionHandle setter = Definition.GetAccessors().Setter;
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
78public MethodDefinitionHandle AddGlobalMethod(string name, InstructionEncoder il, int maxStack)
ILCompiler.ReadyToRun (14)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (2)
222MethodDefinitionHandle customAttributeConstructorDefinitionHandle = (MethodDefinitionHandle)customAttributeConstructorHandle;
Compiler\DependencyAnalysis\ReadyToRun\MethodIsGenericMapNode.cs (1)
45foreach (var methodDefinitionHandle in _metadata.MethodDefinitions)
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (1)
183MethodDefinition methodDef = token.MetadataReader.GetMethodDefinition((MethodDefinitionHandle)token.Handle);
Compiler\ReadyToRunStandaloneMethodMetadata.cs (1)
169var methodDefinition = metadataReader.GetMethodDefinition((MethodDefinitionHandle)handle);
JitInterface\CorInfoImpl.ReadyToRun.cs (2)
185var methodDefinition = moduleToken.MetadataReader.GetMethodDefinition((MethodDefinitionHandle)moduleToken.Handle); 601var handle = ecmaMethod.Handle;
src\runtime\src\coreclr\tools\Common\Compiler\EventPseudoDesc.cs (3)
27MethodDefinitionHandle adder = Definition.GetAccessors().Adder; 36MethodDefinitionHandle setter = Definition.GetAccessors().Remover; 45MethodDefinitionHandle raiser = Definition.GetAccessors().Raiser;
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (1)
185foreach (MethodDefinitionHandle methodHandle in typeDefinition.GetMethods())
src\runtime\src\coreclr\tools\Common\Compiler\PropertyPseudoDesc.cs (2)
31MethodDefinitionHandle getter = Definition.GetAccessors().Getter; 40MethodDefinitionHandle setter = Definition.GetAccessors().Setter;
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
78public MethodDefinitionHandle AddGlobalMethod(string name, InstructionEncoder il, int maxStack)
ILCompiler.TypeSystem (19)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaMethod.cs (3)
41private MethodDefinitionHandle _handle; 50internal EcmaMethod(EcmaType type, MethodDefinitionHandle handle) 116public MethodDefinitionHandle Handle
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaModule.cs (4)
102MethodDefinitionHandle methodDefinitionHandle = (MethodDefinitionHandle)handle; 474public EcmaMethod GetMethod(MethodDefinitionHandle handle) 502internal EcmaMethod GetMethod(MethodDefinitionHandle handle, EcmaType owningType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.cs (6)
293foreach (var handle in _typeDefinition.GetMethods()) 302foreach (var handle in _typeDefinition.GetMethods()) 325foreach (var handle in _typeDefinition.GetMethods()) 342foreach (var handle in _typeDefinition.GetMethods()) 360foreach (var handle in _typeDefinition.GetMethods()) 382foreach (var handle in _typeDefinition.GetMethods())
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.MethodImpls.cs (1)
38HandleKind.MethodDefinition => metadataReader.GetMethodDefinition((MethodDefinitionHandle)methodDeclCheckHandle).Name,
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (2)
164attributeType = metadataReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor).GetDeclaringType(); 311public static unsafe byte* GetMethodNamePointer(this MetadataReader reader, MethodDefinitionHandle handle)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\SymbolReader\PortablePdbSymbolReader.cs (3)
113var debugInformationHandle = ((MethodDefinitionHandle)MetadataTokens.EntityHandle(methodToken)).ToDebugInformationHandle(); 117var kickoffMethod = debugInformation.GetStateMachineKickoffMethod(); 138var debugInformationHandle = ((MethodDefinitionHandle)MetadataTokens.EntityHandle(methodToken)).ToDebugInformationHandle();
Microsoft.CodeAnalysis (107)
Compilation\Compilation.cs (4)
3067ICollection<MethodDefinitionHandle> updatedMethods, 3088ICollection<MethodDefinitionHandle> updatedMethods, 3093foreach (var token in diff.UpdatedMethods) 3529ArrayBuilder<MethodDefinitionHandle> updatedMethods,
Emit\EditAndContinue\DefinitionMap.cs (10)
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) 175private MethodDefinitionHandle GetPreviousMethodHandle(IMethodSymbolInternal oldProperty, out IMethodSymbolInternal? peMethod) 190return (MethodDefinitionHandle)MetadataTokens.EntityHandle(peMethod.MetadataToken); 265protected abstract ITypeSymbolInternal? TryGetStateMachineType(MethodDefinitionHandle methodHandle); 266protected abstract IMethodSymbolInternal GetMethodSymbol(MethodDefinitionHandle methodHandle); 279if (!TryGetMethodHandle(method, out var methodHandle)) 728var methodHandle = GetPreviousMethodHandle(oldMethod, out var peMethod);
Emit\EditAndContinue\DeletedPEMethodDefinition.cs (1)
36public MethodDefinitionHandle MetadataHandle
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (3)
16private readonly MethodDefinitionHandle _handle; 20public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers, ICustomAttribute? deletedAttribute) 28public MethodDefinitionHandle MetadataHandle
Emit\EditAndContinue\DeltaMetadataWriter.cs (12)
59private readonly Dictionary<MethodDefinitionHandle, int> _firstParamRowMap; 117_firstParamRowMap = new Dictionary<MethodDefinitionHandle, int>(); 298public void GetUpdatedMethodTokens(ArrayBuilder<MethodDefinitionHandle> methods) 378protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 385protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 388protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle index) 414protected override MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef) 569var deletedMethodHandle = changes.DefinitionMap.GetPreviousMethodHandle(deletedMethod); 624var deletedClosureMethodHandle = changes.DefinitionMap.GetPreviousMethodHandle(deletedClosureMethod); 813var handle = GetMethodDefinitionHandle(methodDef); 836private void EmitParametersFromOriginalMetadata(IMethodDefinition methodDef, MethodDefinitionHandle handle) 853private 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)
2077internal bool HasStateMachineAttribute(MethodDefinitionHandle handle, out string stateMachineTypeName) 3109var methodDef = metadataReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor); 3334internal string GetMethodDefNameOrThrow(MethodDefinitionHandle methodDef) 3340internal BlobHandle GetMethodSignatureOrThrow(MethodDefinitionHandle methodDef) 3346private static BlobHandle GetMethodSignatureOrThrow(MetadataReader metadataReader, MethodDefinitionHandle methodDef) 3363return GetMethodSignatureOrThrow(metadataReader, (MethodDefinitionHandle)methodDefOrRef); 3374public MethodAttributes GetMethodDefFlagsOrThrow(MethodDefinitionHandle methodDef) 3380internal TypeDefinitionHandle FindContainingTypeOrThrow(MethodDefinitionHandle methodDef) 3399MethodDefinitionHandle methodDef, 3425internal GenericParameterHandleCollection GetGenericParametersForMethodOrThrow(MethodDefinitionHandle methodDef) 3431internal ParameterHandleCollection GetParametersOfMethodOrThrow(MethodDefinitionHandle methodDef) 3436internal DllImportData GetDllImportData(MethodDefinitionHandle methodDef) 3995internal MethodBodyBlock GetMethodBodyOrThrow(MethodDefinitionHandle methodHandle)
NativePdbWriter\PdbWriter.cs (2)
68var 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)
171protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 179protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 184protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle handle) 224protected override MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef)
PEWriter\MetadataWriter.cs (14)
216protected abstract bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle); 221protected abstract MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def); 227protected abstract IMethodDefinition GetMethodDef(MethodDefinitionHandle handle); 271protected abstract MethodDefinitionHandle GetFirstMethodDefinitionHandle(INamedTypeDefinition typeDef); 943MethodDefinitionHandle methodHandle; 1169MethodDefinitionHandle methodDefHandle; 1770debugEntryPoint: default(MethodDefinitionHandle), 1881public PortablePdbBuilder GetPortablePdbBuilder(ImmutableArray<int> typeSystemRowCounts, MethodDefinitionHandle debugEntryPoint, Func<IEnumerable<Blob>, BlobContentId> deterministicIdProviderOpt) 1886internal void GetEntryPoints(out MethodDefinitionHandle entryPointHandle, out MethodDefinitionHandle debugEntryPointHandle) 1892entryPointHandle = entryPoint != null ? (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)entryPoint.AsDefinition(Context)) : default(MethodDefinitionHandle); 1898debugEntryPointHandle = (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)debugEntryPoint.AsDefinition(Context)); 1907entryPointHandle = 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)
121MethodDefinitionHandle entryPointHandle; 122MethodDefinitionHandle debugEntryPointHandle;
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
67public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle) 75public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
Microsoft.CodeAnalysis.CSharp (33)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
131protected override ITypeSymbolInternal? TryGetStateMachineType(MethodDefinitionHandle methodHandle) 134protected override IMethodSymbolInternal GetMethodSymbol(MethodDefinitionHandle methodHandle)
Emitter\EditAndContinue\EmitHelpers.cs (1)
121var updatedMethods = ArrayBuilder<MethodDefinitionHandle>.GetInstance();
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
176foreach (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)
396private readonly MethodDefinitionHandle _handle; 420MethodDefinitionHandle methodDef) 574internal MethodDefinitionHandle Handle => _handle;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (21)
191private class ExtensionInfo(PENamedTypeSymbol markerType, MethodDefinitionHandle markerMethod) 195public readonly MethodDefinitionHandle MarkerMethodHandle = markerMethod; 265MethodDefinitionHandle markerMethod = default) 315MethodDefinitionHandle markerMethod, 1083foreach (var methodDef in module.GetMethodsOfTypeOrThrow(_handle)) 1548var methodDefs = ArrayBuilder<MethodDefinitionHandle>.GetInstance(); 1552foreach (var methodDef in module.GetMethodsOfTypeOrThrow(_handle)) 1560foreach (var methodDef in methodDefs) 1791PooledDictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol = this.CreateMethods(nonFieldMembers); 2295private MethodDefinitionHandle TryGetExtensionMarkerMethod() 2303MethodDefinitionHandle foundMarkerMethod = default; 2304foreach (var methodHandle in module.GetMethodsOfTypeOrThrow(_handle)) 2568private PooledDictionary<MethodDefinitionHandle, PEMethodSymbol> CreateMethods(ArrayBuilder<Symbol> members) 2572var map = PooledDictionary<MethodDefinitionHandle, PEMethodSymbol>.GetInstance(); 2580foreach (var methodHandle in module.GetMethodsOfTypeOrThrow(isExtension ? _lazyUncommonProperties.extensionInfo.GroupingTypeSymbol.Handle : _handle)) 2603private void CreateProperties(Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, ArrayBuilder<Symbol> members) 2642Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, 2681private PEMethodSymbol GetAccessorMethod(PEModule module, Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef) 3182MethodDefinitionHandle markerMethod) : 3255MethodDefinitionHandle markerMethod)
Microsoft.CodeAnalysis.Features (14)
EditAndContinue\EditAndContinueDebugInfoReader.cs (7)
27public abstract EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle); 28public abstract StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle); 60public override StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle) 68public override EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle) 136public override StandaloneSignatureHandle GetLocalSignature(MethodDefinitionHandle methodHandle) 139public override EditAndContinueMethodDebugInformation GetDebugInfo(MethodDefinitionHandle methodHandle) 145private 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\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
67public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle) 75public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
Microsoft.CodeAnalysis.VisualBasic (19)
Emit\EditAndContinue\EmitHelpers.vb (3)
47updatedMethods:=ImmutableArray(Of MethodDefinitionHandle).Empty, 106updatedMethods:=ImmutableArray(Of MethodDefinitionHandle).Empty, 115Dim 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 821Friend ReadOnly Property Handle As MethodDefinitionHandle
Symbols\Metadata\PE\PENamedTypeSymbol.vb (8)
558Dim methodDefs = ArrayBuilder(Of MethodDefinitionHandle).GetInstance() 666Dim methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol) = CreateMethods() 1217Private Function CreateMethods() As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol) 1218Dim methods = New Dictionary(Of MethodDefinitionHandle, PEMethodSymbol)() 1234Private Sub CreateProperties(methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), members As ArrayBuilder(Of Symbol)) 1256Private Sub CreateEvents(methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), members As ArrayBuilder(Of Symbol)) 1281Private Shared Function GetAccessorMethod(moduleSymbol As PEModuleSymbol, methodHandleToSymbol As Dictionary(Of MethodDefinitionHandle, PEMethodSymbol), typeDef As TypeDefinitionHandle, methodDef As MethodDefinitionHandle) As PEMethodSymbol
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (4)
462bool IsPublicMethod(MethodDefinitionHandle methodHandle) 474foreach (var child in typeDefinition.GetMethods()) 523foreach (var childMethod in nestedType.GetMethods()) 622foreach (var child in nestedType.GetMethods())
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Contracts\RuntimeTypeSystem_1.cs (1)
1313MethodDefinitionHandle methodDefHandle = MetadataTokens.MethodDefinitionHandle((int)EcmaMetadataUtils.GetRowId(token));
Contracts\StackWalk\GC\GcScanner.cs (1)
368MethodDefinitionHandle methodDefHandle = MetadataTokens.MethodDefinitionHandle((int)EcmaMetadataUtils.GetRowId(methodToken));
Microsoft.Diagnostics.DataContractReader.Legacy (10)
ClrDataFrame.cs (1)
427MethodDefinitionHandle methodDefHandle = MetadataTokens.MethodDefinitionHandle((int)token);
ClrDataMethodDefinition.cs (1)
76MethodDefinitionHandle methodDefHandle = MetadataTokens.MethodDefinitionHandle(rowId);
ClrDataModule.cs (1)
188foreach (MethodDefinitionHandle mh in _reader.GetTypeDefinition(_typeHandle!.Value).GetMethods())
MetaDataImportImpl.cs (7)
275foreach (MethodDefinitionHandle h in typeDef.GetMethods()) 377genericParams = _reader.GetMethodDefinition((MethodDefinitionHandle)owner).GetGenericParameters(); 526MethodDefinitionHandle methodHandle = MetadataTokens.MethodDefinitionHandle(GetRID(mb)); 868MethodDefinitionHandle methodHandle = MetadataTokens.MethodDefinitionHandle(GetRID(tk)); 1035MethodDefinition method = _reader.GetMethodDefinition((MethodDefinitionHandle)constructor); 1493MethodDefinitionHandle methodHandle = MetadataTokens.MethodDefinitionHandle(GetRID(md)); 2100foreach (MethodDefinitionHandle mdh in _reader.GetTypeDefinition(tdh).GetMethods())
Microsoft.NET.Build.Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
569TypeDefinitionHandle attributeTypeDefHandle = mdReader.GetMethodDefinition((MethodDefinitionHandle)attributeCtor).GetDeclaringType(); 603foreach (var methoddefHandle in mdReader.MethodDefinitions)
Microsoft.NET.HostModel (1)
ComHost\ClsidMap.cs (1)
232MethodDefinition defConstructor = reader.GetMethodDefinition((MethodDefinitionHandle)attribute.Constructor);
Microsoft.VisualStudio.TestPlatform.Common (1)
Utilities\MetadataReaderHelper.cs (1)
95var methodDefinition = metadataReader.GetMethodDefinition((MethodDefinitionHandle)customAttribute.Constructor);
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Navigation\PortablePdbReader.cs (1)
118var handle = ((MethodDefinitionHandle)MetadataTokens.Handle(methodToken)).ToDebugInformationHandle();
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)
35internal MethodDefinitionHandle _handle;
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
368MethodDefinitionHandle handle = AddMethodDefinition(method, method.GetMethodSignatureBlob(), offset, _nextParameterRowId); 414private void AddSymbolInfo(ILGeneratorImpl il, StandaloneSignatureHandle localSignatureHandle, MethodDefinitionHandle methodHandle) 514private void AddLocalScope(MethodDefinitionHandle methodHandle, ImportScopeHandle parentImport, LocalVariableHandle firstLocalVariableHandle, Scope scope) 890private void AddMethodSemantics(EntityHandle parentHandle, MethodSemanticsAttributes attribute, MethodDefinitionHandle methodHandle) => 933private MethodDefinitionHandle AddMethodDefinition(MethodBuilderImpl method, BlobBuilder methodSignature, int offset, int parameterToken) => 954private 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)
113public 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)
20private readonly MethodDefinitionHandle _entryPoint; 51MethodDefinitionHandle 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) 1206public MethodDefinition GetMethodDefinition(MethodDefinitionHandle handle) 1212private uint GetMethodDefTreatmentAndRowId(MethodDefinitionHandle handle) 1322internal TypeDefinitionHandle GetDeclaringType(MethodDefinitionHandle methodDef) 1387public MethodDebugInformation GetMethodDebugInformation(MethodDefinitionHandle handle) 1422public 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)
27public MethodDefinitionHandle Method => _reader.LocalScopeTable.GetMethod(_rowId);
System\Reflection\Metadata\PortablePdb\MethodDebugInformation.cs (1)
66public 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)
38/// The constructor (<see cref="MethodDefinitionHandle"/> or <see cref="MemberReferenceHandle"/>) of the custom attribute type.
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (3)
69ImmutableArray<MethodDefinitionHandle>.Builder? other = null; 91other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>(); 98var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\Metadata\TypeSystem\GenericParameter.cs (1)
25/// <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)
31private MethodDefinitionHandle Handle 33get { return MethodDefinitionHandle.FromRowId(RowId); }
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (3)
80ImmutableArray<MethodDefinitionHandle>.Builder? other = null; 98other ??= ImmutableArray.CreateBuilder<MethodDefinitionHandle>(); 105var 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);