EditAndContinue\AbstractEditAndContinueAnalyzer.cs (40)
2687PooledDictionary<ISymbol, SymbolKey> symbolKeyCache)
2689public SymbolKey GetKey(ISymbol symbol, CancellationToken cancellationToken)
2690=> symbolKeyCache.GetOrAdd(symbol, static (symbol, cancellationToken) => SymbolKey.Create(symbol, cancellationToken), cancellationToken);
2724using var _3 = PooledDictionary<ISymbol, SymbolKey>.GetInstance(out var symbolKeyCache);
2837var containingTypeSymbolKey = symbolCache.GetKey(containingType, cancellationToken);
2884var typeKey = symbolCache.GetKey(newType, cancellationToken);
2980var containingTypeKey = symbolCache.GetKey(oldContainingType, cancellationToken);
3105var containingTypeKey = symbolCache.GetKey(newContainingType, cancellationToken);
3453var containingSymbolKey = symbolCache.GetKey(oldSymbol.ContainingType, cancellationToken);
3476var symbolKey = symbolCache.GetKey(symbol, cancellationToken);
3486: (SymbolKey?)null;
3595var symbolKey = symbolCache.GetKey(newSymbol, cancellationToken);
3637static ISymbol? Resolve(ISymbol symbol, SymbolKey symbolKey, Compilation compilation, CancellationToken cancellationToken)
3749SymbolKey containingTypeKey,
3801SymbolKey containingTypeKey,
3816if (SymbolKey.Create(deconstructor, cancellationToken).Resolve(otherCompilation, cancellationToken: cancellationToken).Symbol != null)
3921private static void AddDeleteEditsForMemberAndAccessors(ArrayBuilder<SemanticEditInfo> semanticEdits, ISymbol oldSymbol, SymbolKey deletedSymbolContainer, CancellationToken cancellationToken)
3974SymbolKey containingSymbolKey,
4002semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(oldSymbol, cancellationToken), syntaxMaps: default, partialType: null));
4064var newType = SymbolKey.Create(oldType, cancellationToken).Resolve(newModel.Compilation, cancellationToken: cancellationToken).Symbol;
4095var oldType = SymbolKey.Create(newType, cancellationToken).Resolve(oldModel.Compilation, cancellationToken: cancellationToken).Symbol;
4188var oldOutermostReloadableTypeKey = SymbolKey.Create(oldOutermostReloadableType, cancellationToken);
4230private static readonly IEqualityComparer<SymbolKey> s_symbolKeyComparer = SymbolKey.GetComparer();
4804var containingSymbolKey = SymbolKey.Create(oldContainingMember.ContainingSymbol, cancellationToken);
4827semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(beginInvokeMethod, cancellationToken), syntaxMaps: default, partialType: null));
5101var symbolKey = SymbolKey.Create(member, cancellationToken);
5246var symbolKey = SymbolKey.Create(oldSymbol, cancellationToken);
5580var typeKey = SymbolKey.Create(newType, cancellationToken);
5581var partialType = isPartialEdit ? typeKey : (SymbolKey?)null;
5615var newCtorKey = SymbolKey.Create(newCtor, cancellationToken);
5756SymbolKey.Create(oldType.InstanceConstructors.Single(c => c.Parameters is []), cancellationToken),
7108var oldConstructor = SymbolKey.Create(newPrimaryConstructor, cancellationToken).Resolve(oldCompilation, cancellationToken: cancellationToken).Symbol;
7121var oldParameter = SymbolKey.Create(newPrimaryParameter, cancellationToken).Resolve(oldCompilation, cancellationToken: cancellationToken).Symbol;
EditAndContinue\SemanticEditInfo.cs (28)
44SymbolKey symbol,
46SymbolKey? partialType,
47SymbolKey? deletedSymbolContainer)
58public static SemanticEditInfo CreateInsert(SymbolKey symbol, SymbolKey? partialType)
64var partialType = symbol.IsPartialImplementation() ? SymbolKey.Create(symbol.ContainingType, cancellationToken) : (SymbolKey?)null;
65return CreateInsert(SymbolKey.Create(symbol, cancellationToken), partialType);
68public static SemanticEditInfo CreateUpdate(SymbolKey symbol, SyntaxMaps syntaxMaps, SymbolKey? partialType)
74var partialType = symbol.IsPartialImplementation() ? SymbolKey.Create(symbol.ContainingType, cancellationToken) : (SymbolKey?)null;
75return CreateUpdate(SymbolKey.Create(symbol, cancellationToken), syntaxMaps, partialType);
78public static SemanticEditInfo CreateReplace(SymbolKey symbol, SymbolKey? partialType)
81public static SemanticEditInfo CreateDelete(SymbolKey symbol, SymbolKey deletedSymbolContainer, SymbolKey? partialType)
84public static SemanticEditInfo CreateDelete(ISymbol symbol, SymbolKey containingSymbolKey, CancellationToken cancellationToken)
87var partialType = symbol.IsPartialImplementation() ? containingSymbolKey : (SymbolKey?)null;
88return CreateDelete(SymbolKey.Create(symbol, cancellationToken), containingSymbolKey, partialType);
101/// We use <see cref="SymbolKey"/> to represent the symbol rather then <see cref="ISymbol"/>,
103/// When the edits are processed we map the <see cref="SymbolKey"/> to the current compilation.
105public SymbolKey Symbol { get; }
110/// We use <see cref="SymbolKey"/> to represent the symbol rather then <see cref="ISymbol"/>,
112/// When the edits are processed we map the <see cref="SymbolKey"/> to the current compilation.
114public SymbolKey? DeletedSymbolContainer { get; }
126public SymbolKey? PartialType { get; }
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (9)
69var symbolId = SymbolKey.Create(symbol, cancellationToken);
384return new UniqueDocumentKey(peMetadataReference.FilePath, peMetadataReference.GetMetadataId(), project.Language, SymbolKey.Create(topLevelNamedType, cancellationToken), signaturesOnly);
389return new UniqueDocumentKey(containingAssembly.Identity, containingAssembly.GetMetadata()?.Id, project.Language, SymbolKey.Create(topLevelNamedType, cancellationToken), signaturesOnly);
395private static readonly IEqualityComparer<SymbolKey> s_symbolIdComparer = SymbolKey.GetComparer(ignoreCase: false, ignoreAssemblyKeys: true);
409private readonly SymbolKey _symbolId;
412public UniqueDocumentKey(string filePath, MetadataId? metadataId, string language, SymbolKey symbolId, bool signaturesOnly)
423public UniqueDocumentKey(AssemblyIdentity assemblyIdentity, MetadataId? metadataId, string language, SymbolKey symbolId, bool signaturesOnly)
NavigationBar\IRemoteNavigationBarItemService.cs (12)
50public readonly SymbolKey? DestinationTypeSymbolKey;
57public readonly SymbolKey? EventSymbolKey;
62public readonly SymbolKey? MethodToReplicateSymbolKey;
75SymbolKey? destinationTypeSymbolKey,
77SymbolKey? eventSymbolKey,
78SymbolKey? methodToReplicateSymbolKey)
117public static SerializableNavigationBarItem GenerateFinalizer(string text, SymbolKey destinationTypeSymbolKey)
120public static SerializableNavigationBarItem GenerateEventHandler(string eventName, Glyph glyph, string containerName, SymbolKey eventSymbolKey, SymbolKey destinationTypeSymbolKey)
123public static SerializableNavigationBarItem GenerateMethod(string text, Glyph glyph, SymbolKey destinationTypeSymbolId, SymbolKey methodToReplicateSymbolId)
126public static SerializableNavigationBarItem GenerateDefaultConstructor(string text, SymbolKey destinationTypeSymbolKey)