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);