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