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);
2825var containingTypeSymbolKey = symbolCache.GetKey(containingType, cancellationToken);
2873var typeKey = symbolCache.GetKey(newType, cancellationToken);
2969var containingTypeKey = symbolCache.GetKey(oldContainingType, cancellationToken);
3094var containingTypeKey = symbolCache.GetKey(newContainingType, cancellationToken);
3442var containingSymbolKey = symbolCache.GetKey(oldSymbol.ContainingType, cancellationToken);
3465var symbolKey = symbolCache.GetKey(symbol, cancellationToken);
3475: (SymbolKey?)null;
3516var oldContainingTypeKey = SymbolKey.Create(oldContainingType, cancellationToken);
3587var symbolKey = symbolCache.GetKey(newSymbol, cancellationToken);
3629static ISymbol? Resolve(ISymbol symbol, SymbolKey symbolKey, Compilation compilation, CancellationToken cancellationToken)
3741SymbolKey containingTypeKey,
3793SymbolKey containingTypeKey,
3808if (SymbolKey.Create(deconstructor, cancellationToken).Resolve(otherCompilation, ignoreAssemblyKey: true, cancellationToken).Symbol != null)
3913private static void AddDeleteEditsForMemberAndAccessors(ArrayBuilder<SemanticEditInfo> semanticEdits, ISymbol oldSymbol, SymbolKey deletedSymbolContainer, CancellationToken cancellationToken)
3966SymbolKey containingSymbolKey,
3994semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(oldSymbol, cancellationToken), syntaxMaps: default, partialType: null));
4056var newType = SymbolKey.Create(oldType, cancellationToken).Resolve(newModel.Compilation, ignoreAssemblyKey: true, cancellationToken).Symbol;
4087var oldType = SymbolKey.Create(newType, cancellationToken).Resolve(oldModel.Compilation, ignoreAssemblyKey: true, cancellationToken).Symbol;
4179private static readonly IEqualityComparer<SymbolKey> s_symbolKeyComparer = SymbolKey.GetComparer();
4753var containingSymbolKey = SymbolKey.Create(oldContainingMember.ContainingSymbol, cancellationToken);
4776semanticEdits.Add(SemanticEditInfo.CreateUpdate(SymbolKey.Create(beginInvokeMethod, cancellationToken), syntaxMaps: default, partialType: null));
5050var symbolKey = SymbolKey.Create(member, cancellationToken);
5195var symbolKey = SymbolKey.Create(oldSymbol, cancellationToken);
5529var typeKey = SymbolKey.Create(newType, cancellationToken);
5530var partialType = isPartialEdit ? typeKey : (SymbolKey?)null;
5564var newCtorKey = SymbolKey.Create(newCtor, cancellationToken);
5705SymbolKey.Create(oldType.InstanceConstructors.Single(c => c.Parameters is []), cancellationToken),
7057var oldConstructor = SymbolKey.Create(newPrimaryConstructor, cancellationToken).Resolve(oldCompilation, ignoreAssemblyKey: true, cancellationToken).Symbol;
7070var oldParameter = SymbolKey.Create(newPrimaryParameter, cancellationToken).Resolve(oldCompilation, ignoreAssemblyKey: true, 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)