74 references to SymbolChange
Microsoft.CodeAnalysis (74)
Emit\EditAndContinue\DeltaMetadataWriter.cs (19)
592var change = _changes.GetChange(typeDef); 595case SymbolChange.Added: 610case SymbolChange.Updated: 615case SymbolChange.ContainsChanges: 623case SymbolChange.None: 640var eventChange = _changes.GetChangeForPossibleReAddedMember(eventDef, DefinitionExistsInAnyPreviousGeneration); 646var fieldChange = _changes.GetChangeForPossibleReAddedMember(fieldDef, DefinitionExistsInAnyPreviousGeneration); 652var methodChange = _changes.GetChangeForPossibleReAddedMember(methodDef, DefinitionExistsInAnyPreviousGeneration); 675var propertyChange = _changes.GetChangeForPossibleReAddedMember(propertyDef, DefinitionExistsInAnyPreviousGeneration); 728private void CreateIndicesForMethod(IMethodDefinition methodDef, SymbolChange methodChange) 733if (methodChange == SymbolChange.Added) 742else if (methodChange == SymbolChange.Updated) 760if (methodChange == SymbolChange.Added) 802private bool AddDefIfNecessary<T>(DefinitionIndex<T> defIndex, T def, SymbolChange change) 807case SymbolChange.Added: 810case SymbolChange.Updated: 813case SymbolChange.ContainsChanges: 1875if (_changes.GetChange(methodDef) == SymbolChange.Added) 1923return def.IsEncDeleted || _changes.GetChange(def) != SymbolChange.None;
Emit\EditAndContinue\SymbolChanges.cs (55)
28private readonly IReadOnlyDictionary<ISymbolInternal, SymbolChange> _changes; 97=> GetChange(symbol) != SymbolChange.None; 126public SymbolChange GetChange(IDefinition def) 133return SymbolChange.Added; 140var generatorChange = GetChange((IDefinition)synthesizedSymbol.Method.GetCciAdapter()); 143case SymbolChange.Updated: 150return SymbolChange.Added; 157return SymbolChange.Added; 166return SymbolChange.None; 172return SymbolChange.ContainsChanges; 178return SymbolChange.Updated; 181return SymbolChange.None; 183case SymbolChange.Added: 187return SymbolChange.Added; 195return SymbolChange.ContainsChanges; 203return SymbolChange.Updated; 208return SymbolChange.None; 225return (def is ITypeDefinition) ? SymbolChange.ContainsChanges : SymbolChange.None; 228return SymbolChange.Added; 231private SymbolChange GetChange(ISymbolInternal symbol) 242if (_changes.TryGetValue(symbol, out var change)) 251return SymbolChange.None; 254var containerChange = GetChange(container); 257case SymbolChange.Added: 259return SymbolChange.Added; 261case SymbolChange.None: 263return SymbolChange.None; 265case SymbolChange.Updated: 266case SymbolChange.ContainsChanges: 271return _definitionMap.NamespaceExists((INamespace)symbol.GetCciAdapter()) ? SymbolChange.ContainsChanges : SymbolChange.Added; 275return DefinitionExistsInPreviousGeneration(symbol) ? SymbolChange.None : SymbolChange.Added; 282public SymbolChange GetChangeForPossibleReAddedMember(ITypeDefinitionMember item, Func<ITypeDefinitionMember, bool> definitionExistsInAnyPreviousGeneration) 284var change = GetChange(item); 288SymbolChange fixChangeIfMemberIsReAdded(ITypeDefinitionMember item, SymbolChange change, Func<ITypeDefinitionMember, bool> definitionExistsInAnyPreviousGeneration) 298GetChange(containingDef) == SymbolChange.Added && 300fixChangeIfMemberIsReAdded(containingDef, SymbolChange.Added, definitionExistsInAnyPreviousGeneration) == SymbolChange.Updated) 302return SymbolChange.None; 309if (change == SymbolChange.Added && 313return SymbolChange.Updated; 351out IReadOnlyDictionary<ISymbolInternal, SymbolChange> changes, 356var changesBuilder = new Dictionary<ISymbolInternal, SymbolChange>(); 363SymbolChange change; 368change = SymbolChange.Updated; 372change = SymbolChange.Added; 377change = SymbolChange.Added; 403changesBuilder.Add(newContainingType, SymbolChange.ContainsChanges); 455if (changesBuilder.TryGetValue(newMember, out var existingChange) && existingChange == SymbolChange.ContainsChanges) 477private static void AddContainingSymbolChanges(Dictionary<ISymbolInternal, SymbolChange> changes, ISymbolInternal symbol) 487changes.Add(containingSymbol, SymbolChange.ContainsChanges);