EditAndContinue\AbstractEditAndContinueAnalyzer.cs (40)
2692PooledDictionary<ISymbol, SymbolKey> symbolKeyCache)
2694public SymbolKey GetKey(ISymbol symbol, CancellationToken cancellationToken)
2695=> symbolKeyCache.GetOrAdd(symbol, static (symbol, cancellationToken) => SymbolKey.Create(symbol, cancellationToken), cancellationToken);
2729using var _3 = PooledDictionary<ISymbol, SymbolKey>.GetInstance(out var symbolKeyCache);
2842var containingTypeSymbolKey = symbolCache.GetKey(containingType, cancellationToken);
2889var typeKey = symbolCache.GetKey(newType, cancellationToken);
2985var containingTypeKey = symbolCache.GetKey(oldContainingType, cancellationToken);
3110var containingTypeKey = symbolCache.GetKey(newContainingType, cancellationToken);
3458var containingSymbolKey = symbolCache.GetKey(oldSymbol.ContainingType, cancellationToken);
3481var symbolKey = symbolCache.GetKey(symbol, cancellationToken);
3491: (SymbolKey?)null;
3600var symbolKey = symbolCache.GetKey(newSymbol, cancellationToken);
3642static ISymbol? Resolve(ISymbol symbol, SymbolKey symbolKey, Compilation compilation, CancellationToken cancellationToken)
3754SymbolKey containingTypeKey,
3806SymbolKey containingTypeKey,
3821if (SymbolKey.Create(deconstructor, cancellationToken).Resolve(otherCompilation, cancellationToken: cancellationToken).Symbol != null)
3926private static void AddDeleteEditsForMemberAndAccessors(ArrayBuilder<SemanticEditInfo> semanticEdits, ISymbol oldSymbol, SymbolKey deletedSymbolContainer, CancellationToken cancellationToken)
3979SymbolKey containingSymbolKey,
4007semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(oldSymbol, cancellationToken), syntaxMaps: default, partialType: null));
4069var newType = SymbolKey.Create(oldType, cancellationToken).Resolve(newModel.Compilation, cancellationToken: cancellationToken).Symbol;
4100var oldType = SymbolKey.Create(newType, cancellationToken).Resolve(oldModel.Compilation, cancellationToken: cancellationToken).Symbol;
4193var oldOutermostReloadableTypeKey = SymbolKey.Create(oldOutermostReloadableType, cancellationToken);
4235private static readonly IEqualityComparer<SymbolKey> s_symbolKeyComparer = SymbolKey.GetComparer();
4809var containingSymbolKey = SymbolKey.Create(oldContainingMember.ContainingSymbol, cancellationToken);
4832semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(beginInvokeMethod, cancellationToken), syntaxMaps: default, partialType: null));
5106var symbolKey = SymbolKey.Create(member, cancellationToken);
5251var symbolKey = SymbolKey.Create(oldSymbol, cancellationToken);
5585var typeKey = SymbolKey.Create(newType, cancellationToken);
5586var partialType = isPartialEdit ? typeKey : (SymbolKey?)null;
5620var newCtorKey = SymbolKey.Create(newCtor, cancellationToken);
5761SymbolKey.Create(oldType.InstanceConstructors.Single(c => c.Parameters is []), cancellationToken),
7113var oldConstructor = SymbolKey.Create(newPrimaryConstructor, cancellationToken).Resolve(oldCompilation, cancellationToken: cancellationToken).Symbol;
7126var 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);
401return new UniqueDocumentKey(peMetadataReference.FilePath, peMetadataReference.GetMetadataId(), project.Language, SymbolKey.Create(topLevelNamedType, cancellationToken), signaturesOnly);
406return new UniqueDocumentKey(containingAssembly.Identity, containingAssembly.GetMetadata()?.Id, project.Language, SymbolKey.Create(topLevelNamedType, cancellationToken), signaturesOnly);
412private static readonly IEqualityComparer<SymbolKey> s_symbolIdComparer = SymbolKey.GetComparer(ignoreCase: false, ignoreAssemblyKeys: true);
426private readonly SymbolKey _symbolId;
429public UniqueDocumentKey(string filePath, MetadataId? metadataId, string language, SymbolKey symbolId, bool signaturesOnly)
440public 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)