2 interfaces inheriting from IMethodDefinition
Microsoft.CodeAnalysis (2)
Emit\EditAndContinue\IDeletedMethodDefinition.cs (1)
9internal interface IDeletedMethodDefinition : Cci.IMethodDefinition
PEWriter\Members.cs (1)
981internal interface IGlobalMethodDefinition : IMethodDefinition
3 implementations of IMethodDefinition
Microsoft.CodeAnalysis (3)
Emit\NoPia\CommonEmbeddedMethod.cs (1)
39internal abstract class CommonEmbeddedMethod : CommonEmbeddedMember<TMethodSymbol>, Cci.IMethodDefinition
Emit\NoPia\VtblGap.cs (1)
11internal sealed class VtblGap : Cci.IEmbeddedDefinition, Cci.IMethodDefinition
PEWriter\RootModuleStaticConstructor.cs (1)
17internal sealed partial class RootModuleStaticConstructor : IMethodDefinition, IMethodBody
203 references to IMethodDefinition
Microsoft.CodeAnalysis (203)
CodeGen\ArrayMembers.cs (1)
325public Cci.IMethodDefinition? GetResolvedMethod(EmitContext context) => null;
CodeGen\MethodBody.cs (3)
18private readonly Cci.IMethodDefinition _parent; 54Cci.IMethodDefinition parent, 126Cci.IMethodDefinition Cci.IMethodBody.MethodDefinition => _parent;
CodeGen\PrivateImplementationDetails.cs (10)
85private ImmutableArray<Cci.IMethodDefinition> _orderedSynthesizedMethods; 86private readonly ConcurrentDictionary<string, Cci.IMethodDefinition> _synthesizedMethods = 87new ConcurrentDictionary<string, Cci.IMethodDefinition>(); 344internal bool TryAddSynthesizedMethod(Cci.IMethodDefinition method) 358public override IEnumerable<Cci.IMethodDefinition> GetMethods(EmitContext context) 364public IEnumerable<Cci.IMethodDefinition> GetTopLevelAndNestedTypeMethods(EmitContext context) 369foreach (var method in type.GetMethods(context)) 376foreach (var method in nestedType.GetMethods(context)) 385internal Cci.IMethodDefinition? GetMethod(string name) 387Cci.IMethodDefinition? method;
DiaSymReader\Writer\SymUnmanagedWriter.cs (1)
145public abstract void DefineCustomMetadata(byte[] metadata, IMethodDefinition methodDefinition);
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
540public override unsafe void DefineCustomMetadata(byte[] metadata, IMethodDefinition methodDefinition)
Emit\AsyncMoveNextBodyDebugInfo.cs (1)
34Cci.IMethodDefinition kickoffMethod,
Emit\CommonPEModuleBuilder.cs (7)
782Cci.IMethodDefinition cctor = CreatePrivateImplementationDetailsStaticConstructor(syntaxOpt, diagnostics); 789protected abstract Cci.IMethodDefinition CreatePrivateImplementationDetailsStaticConstructor(TSyntaxNode syntaxOpt, DiagnosticBag diagnostics); 800public ConcurrentQueue<Cci.IMethodDefinition> Methods; 842foreach (var method in Methods) 907public void AddSynthesizedDefinition(TNamedTypeSymbol container, Cci.IMethodDefinition method) 914Interlocked.CompareExchange(ref defs.Methods, new ConcurrentQueue<Cci.IMethodDefinition>(), null); 980public IEnumerable<Cci.IMethodDefinition> GetSynthesizedMethods(TNamedTypeSymbol container)
Emit\EditAndContinue\DefinitionMap.cs (6)
140var methodDef = (Cci.IMethodDefinition)method.GetCciAdapter(); 148var mappedDef = (Cci.IMethodDefinition?)SourceToPreviousSymbolMatcher.MapDefinition(methodDef); 171var oldMethodDef = (Cci.IMethodDefinition)oldMethod.GetCciAdapter();
Emit\EditAndContinue\DeletedMethodBody.cs (1)
30public Cci.IMethodDefinition MethodDefinition => _methodDef;
Emit\EditAndContinue\DeletedPEMethodDefinition.cs (1)
170public Cci.IMethodDefinition GetResolvedMethod(EmitContext context)
Emit\EditAndContinue\DeletedSourceGenericParameter.cs (1)
23public IMethodDefinition DefiningMethod => _method;
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (3)
15: DeletedSourceDefinition<IMethodDefinition>, IDeletedMethodDefinition 21public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 127public IMethodDefinition GetResolvedMethod(EmitContext context)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (1)
119public IEnumerable<IMethodDefinition> GetMethods(EmitContext context)
Emit\EditAndContinue\DeltaMetadataWriter.cs (40)
37private readonly Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>> _deletedTypeMembers; 38private readonly IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> _deletedMethodDefs; 43private readonly DefinitionIndex<IMethodDefinition> _methodDefs; 46private readonly Dictionary<IParameterDefinition, IMethodDefinition> _parameterDefList; 69private readonly Dictionary<IMethodDefinition, AddedOrChangedMethodInfo> _addedOrChangedMethods; 78IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> deletedMethodDefs, 103_deletedTypeMembers = new Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 108_methodDefs = new DefinitionIndex<IMethodDefinition>(this.TryGetExistingMethodDefIndex, sizes[(int)TableIndex.MethodDef]); 111_parameterDefList = new Dictionary<IParameterDefinition, IMethodDefinition>(Cci.SymbolEquivalentEqualityComparer.Instance); 131_addedOrChangedMethods = new Dictionary<IMethodDefinition, AddedOrChangedMethodInfo>(Cci.SymbolEquivalentEqualityComparer.Instance); 279foreach (var def in _methodDefs.GetRows()) 357protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 364protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 367protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle index) 370protected override IReadOnlyList<IMethodDefinition> GetMethodDefs() 397protected override ParameterHandle GetFirstParameterHandle(IMethodDefinition methodDef) 495internal static IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> CreateDeletedMethodsDefs(EmitContext context, SymbolChanges changes) 497var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 521ArrayBuilder<IMethodDefinition>? getDeletedMethodDefs(ITypeDefinition typeDef) 529var newMethodDefs = ArrayBuilder<IMethodDefinition>.GetInstance(); 539var deletedMethodDef = (IMethodDefinition)deletedMethod.GetCciAdapter(); 551var newMethodDef = (IMethodDefinition)newMethod.GetCciAdapter(); 576var deletedClosureMethodDef = (IMethodDefinition)deletedClosureMethod.GetCciAdapter(); 650foreach (var methodDef in typeDef.GetMethods(this.Context)) 660foreach (var newMethodDef in newMethodDefs) 684var methodDef = (IMethodDefinition?)methodImpl.ImplementingMethod.AsDefinition(this.Context); 721IMethodDefinition methodDef => TryGetExistingMethodDefIndex(methodDef, out _), 728private void CreateIndicesForMethod(IMethodDefinition methodDef, SymbolChange methodChange) 772private void EmitParametersFromOriginalMetadata(IMethodDefinition methodDef, MethodDefinitionHandle handle) 789private void EmitParametersFromDelta(IMethodDefinition methodDef, MethodDefinitionHandle handle) 1185var methodDef = _parameterDefList[paramDef]; 1640private bool TryGetExistingMethodDefIndex(IMethodDefinition item, out int index) 1823private readonly IReadOnlyDictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>> _deletedTypeMembers; 1862public override void Visit(IMethodDefinition method) 1872var methodDef = (IMethodDefinition?)methodImplementation.ImplementingMethod.AsDefinition(this.Context);
Emit\EditAndContinue\EmitBaseline.cs (4)
180methodsAdded: new Dictionary<Cci.IMethodDefinition, int>(), 238internal readonly IReadOnlyDictionary<Cci.IMethodDefinition, int> MethodsAdded; 301IReadOnlyDictionary<Cci.IMethodDefinition, int> methodsAdded, 400IReadOnlyDictionary<Cci.IMethodDefinition, int> methodsAdded,
Emit\IteratorMoveNextBodyDebugInfo.cs (1)
15public IteratorMoveNextBodyDebugInfo(Cci.IMethodDefinition kickoffMethod)
Emit\NoPia\CommonEmbeddedMethod.cs (27)
99Cci.IMethodBody? Cci.IMethodDefinition.GetBody(EmitContext context) 131Cci.IMethodDefinition Cci.IMethodBody.MethodDefinition => _method; 178IEnumerable<Cci.IGenericMethodParameter> Cci.IMethodDefinition.GenericParameters => _typeParameters; 180bool Cci.IMethodDefinition.HasDeclarativeSecurity => false; 182bool Cci.IMethodDefinition.IsAbstract => IsAbstract; 184bool Cci.IMethodDefinition.IsAccessCheckedOnOverride => IsAccessCheckedOnOverride; 186bool Cci.IMethodDefinition.IsConstructor => IsConstructor; 188bool Cci.IMethodDefinition.IsExternal => IsExternal; 190bool Cci.IMethodDefinition.IsHiddenBySignature => IsHiddenBySignature; 192bool Cci.IMethodDefinition.IsNewSlot => IsNewSlot; 194bool Cci.IMethodDefinition.IsPlatformInvoke => PlatformInvokeData != null; 196Cci.IPlatformInvokeInformation Cci.IMethodDefinition.PlatformInvokeData => PlatformInvokeData; 198bool Cci.IMethodDefinition.IsRuntimeSpecial => IsRuntimeSpecial; 200bool Cci.IMethodDefinition.IsSpecialName => IsSpecialName; 202bool Cci.IMethodDefinition.IsSealed => IsSealed; 204bool Cci.IMethodDefinition.IsStatic => IsStatic; 206bool Cci.IMethodDefinition.IsVirtual => IsVirtual; 208System.Reflection.MethodImplAttributes Cci.IMethodDefinition.GetImplementationAttributes(EmitContext context) 213ImmutableArray<Cci.IParameterDefinition> Cci.IMethodDefinition.Parameters 221bool Cci.IMethodDefinition.RequiresSecurityObject => false; 223IEnumerable<Cci.ICustomAttribute> Cci.IMethodDefinition.GetReturnValueAttributes(EmitContext context) 229bool Cci.IMethodDefinition.ReturnValueIsMarshalledExplicitly => ReturnValueIsMarshalledExplicitly; 231Cci.IMarshallingInformation Cci.IMethodDefinition.ReturnValueMarshallingInformation => ReturnValueMarshallingInformation; 233ImmutableArray<byte> Cci.IMethodDefinition.ReturnValueMarshallingDescriptor => ReturnValueMarshallingDescriptor; 235IEnumerable<Cci.SecurityAttribute> Cci.IMethodDefinition.SecurityAttributes => 240Cci.INamespace Cci.IMethodDefinition.ContainingNamespace => ContainingNamespace; 265Cci.IMethodDefinition Cci.IMethodReference.GetResolvedMethod(EmitContext context)
Emit\NoPia\CommonEmbeddedType.cs (3)
46private ImmutableArray<Cci.IMethodDefinition> _lazyMethods; 441IEnumerable<Cci.IMethodDefinition> Cci.ITypeDefinition.GetMethods(EmitContext context) 447var builder = ArrayBuilder<Cci.IMethodDefinition>.GetInstance();
Emit\NoPia\CommonEmbeddedTypeParameter.cs (1)
60Cci.IMethodDefinition Cci.IGenericMethodParameter.DefiningMethod
Emit\NoPia\VtblGap.cs (28)
25bool Cci.IMethodDefinition.HasBody 28Cci.IMethodBody? Cci.IMethodDefinition.GetBody(EmitContext context) 33IEnumerable<Cci.IGenericMethodParameter> Cci.IMethodDefinition.GenericParameters 38bool Cci.IMethodDefinition.HasDeclarativeSecurity 43bool Cci.IMethodDefinition.IsAbstract 48bool Cci.IMethodDefinition.IsAccessCheckedOnOverride 53bool Cci.IMethodDefinition.IsConstructor 58bool Cci.IMethodDefinition.IsExternal 63bool Cci.IMethodDefinition.IsHiddenBySignature 68bool Cci.IMethodDefinition.IsNewSlot 73bool Cci.IMethodDefinition.IsPlatformInvoke 78bool Cci.IMethodDefinition.IsRuntimeSpecial 83bool Cci.IMethodDefinition.IsSealed 88bool Cci.IMethodDefinition.IsSpecialName 93bool Cci.IMethodDefinition.IsStatic 98bool Cci.IMethodDefinition.IsVirtual 103System.Reflection.MethodImplAttributes Cci.IMethodDefinition.GetImplementationAttributes(EmitContext context) 108ImmutableArray<Cci.IParameterDefinition> Cci.IMethodDefinition.Parameters 113Cci.IPlatformInvokeInformation Cci.IMethodDefinition.PlatformInvokeData 118bool Cci.IMethodDefinition.RequiresSecurityObject 123IEnumerable<Cci.ICustomAttribute> Cci.IMethodDefinition.GetReturnValueAttributes(EmitContext context) 128bool Cci.IMethodDefinition.ReturnValueIsMarshalledExplicitly 133Cci.IMarshallingInformation Cci.IMethodDefinition.ReturnValueMarshallingInformation 138ImmutableArray<byte> Cci.IMethodDefinition.ReturnValueMarshallingDescriptor 143IEnumerable<Cci.SecurityAttribute> Cci.IMethodDefinition.SecurityAttributes 153Cci.INamespace Cci.IMethodDefinition.ContainingNamespace 179visitor.Visit((Cci.IMethodDefinition)this); 204Cci.IMethodDefinition Cci.IMethodReference.GetResolvedMethod(EmitContext context)
Emit\StateMachineMoveNextDebugInfo.cs (2)
19public readonly Cci.IMethodDefinition KickoffMethod; 21public StateMachineMoveNextBodyDebugInfo(Cci.IMethodDefinition kickoffMethod)
NativePdbWriter\PdbWriter.cs (2)
116if (customDebugInfoWriter.ShouldForwardNamespaceScopes(Context, methodBody, methodHandle, out IMethodDefinition forwardToMethod)) 162IMethodDefinition method = methodBody.MethodDefinition;
NativePdbWriter\SymWriterMetadataProvider.cs (1)
72IMethodDefinition m = _writer.GetMethodDefinition(methodDefinitionToken);
PEWriter\CustomDebugInfoWriter.cs (1)
42public bool ShouldForwardNamespaceScopes(EmitContext context, IMethodBody methodBody, MethodDefinitionHandle methodHandle, out IMethodDefinition forwardToMethod)
PEWriter\FullMetadataWriter.cs (11)
23private readonly DefinitionIndex<IMethodDefinition> _methodDefs; 30private readonly SegmentedDictionary<IMethodDefinition, int> _parameterListIndex; 96_methodDefs = new DefinitionIndex<IMethodDefinition>(numMethods); 103_parameterListIndex = new SegmentedDictionary<IMethodDefinition, int>(numMethods, ReferenceEqualityComparer.Instance); 172protected override bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle) 180protected override MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def) 185protected override IMethodDefinition GetMethodDef(MethodDefinitionHandle handle) 190protected override IReadOnlyList<IMethodDefinition> GetMethodDefs() 230protected override ParameterHandle GetFirstParameterHandle(IMethodDefinition methodDef) 399foreach (IMethodDefinition methodDef in typeDef.GetMethods(Context)) 411private void CreateIndicesFor(IMethodDefinition methodDef)
PEWriter\Members.cs (5)
413IMethodDefinition MethodDefinition { get; } 941IMethodDefinition? GetResolvedMethod(EmitContext context); 994internal static bool HasBody(IMethodDefinition methodDef) 1015var method = member as IMethodDefinition;
PEWriter\MetadataVisitor.cs (4)
195this.Visit((IMethodDefinition)globalMethodDefinition); 274public void Visit(IEnumerable<IMethodDefinition> methods) 276foreach (IMethodDefinition method in methods) 282public virtual void Visit(IMethodDefinition method)
PEWriter\MetadataWriter.cs (20)
217protected abstract bool TryGetMethodDefinitionHandle(IMethodDefinition def, out MethodDefinitionHandle handle); 222protected abstract MethodDefinitionHandle GetMethodDefinitionHandle(IMethodDefinition def); 228protected abstract IMethodDefinition GetMethodDef(MethodDefinitionHandle handle); 234protected abstract IReadOnlyList<IMethodDefinition> GetMethodDefs(); 277protected abstract ParameterHandle GetFirstParameterHandle(IMethodDefinition methodDef); 588protected ImmutableArray<IParameterDefinition> GetParametersToEmit(IMethodDefinition methodDef) 598private ImmutableArray<IParameterDefinition> GetParametersToEmitCore(IMethodDefinition methodDef) 726IMethodDefinition methodDef = null; 966IMethodDefinition methodDef = null; 978public static MethodAttributes GetMethodAttributes(IMethodDefinition methodDef) 1171IMethodDefinition methodDef = null; 1631internal IMethodDefinition GetMethodDefinition(int token) 1679IMethodDefinition methodDef => GetMethodDefinitionHandle(methodDef), 1876entryPointHandle = entryPoint != null ? (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)entryPoint.AsDefinition(Context)) : default(MethodDefinitionHandle); 1882debugEntryPointHandle = (MethodDefinitionHandle)GetMethodHandle((IMethodDefinition)debugEntryPoint.AsDefinition(Context)); 2167foreach (IMethodDefinition methodDef in this.GetMethodDefs()) 2472foreach (IMethodDefinition methodDef in this.GetMethodDefs()) 2619foreach (IMethodDefinition methodDef in methodDefs) 2912foreach (IMethodDefinition method in methods) 2951foreach (IMethodDefinition method in methods)
PEWriter\ReferenceIndexer.cs (1)
104protected override void ProcessMethodBody(IMethodDefinition method)
PEWriter\ReferenceIndexerBase.cs (2)
129public override void Visit(IMethodDefinition method) 135protected abstract void ProcessMethodBody(IMethodDefinition method);
PEWriter\ReturnValueParameter.cs (2)
14internal ReturnValueParameter(IMethodDefinition containingMethod) 31private readonly IMethodDefinition _containingMethod;
PEWriter\RootModuleStaticConstructor.cs (3)
110public void Dispatch(MetadataVisitor visitor) => visitor.Visit((IMethodDefinition)this); 120public IMethodDefinition GetResolvedMethod(EmitContext context) => this; 132public IMethodDefinition MethodDefinition => this;
PEWriter\RootModuleType.cs (3)
21private IReadOnlyList<IMethodDefinition>? _methods; 36public IEnumerable<IMethodDefinition> GetMethods(EmitContext context) 38return _methods ??= SpecializedCollections.EmptyReadOnlyList<IMethodDefinition>();
PEWriter\TypeReferenceIndexer.cs (1)
50protected override void ProcessMethodBody(IMethodDefinition method)
PEWriter\Types.cs (4)
188new IMethodDefinition DefiningMethod 352public readonly Cci.IMethodDefinition ImplementingMethod; 359public MethodImplementation(Cci.IMethodDefinition ImplementingMethod, Cci.IMethodReference ImplementedMethod) 575IEnumerable<IMethodDefinition> GetMethods(EmitContext context);