66 references to SemanticEditKind
Microsoft.CodeAnalysis (26)
Emit\EditAndContinue\DefinitionMap.cs (1)
87
if (edit.Kind ==
SemanticEditKind
.Update && edit.SyntaxMap != null)
Emit\EditAndContinue\EmitBaseline.cs (1)
231
/// The latest generation number of each symbol added via <see cref="
SemanticEditKind
.Replace"/> edit.
Emit\EditAndContinue\SymbolChanges.cs (7)
32
/// Populated based on semantic edits with <see cref="
SemanticEditKind
.Replace"/>.
40
/// Populated based on semantic edits with <see cref="
SemanticEditKind
.Delete"/>.
368
case
SemanticEditKind
.Update:
372
case
SemanticEditKind
.Insert:
376
case
SemanticEditKind
.Replace:
381
case
SemanticEditKind
.Delete:
428
if (edit.Kind ==
SemanticEditKind
.Update)
Emit\SemanticEdit.cs (17)
24
public
SemanticEditKind
Kind { get; }
58
/// <see cref="Kind"/> must be <see cref="
SemanticEditKind
.Update"/>.
65
public SemanticEdit(
SemanticEditKind
kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap, bool preserveLocalVariables)
74
public SemanticEdit(
SemanticEditKind
kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap, bool preserveLocalVariables, MethodInstrumentation instrumentation)
89
/// from the later compilation if <paramref name="kind"/> is <see cref="
SemanticEditKind
.Delete"/>.
99
/// <paramref name="oldSymbol"/> or <paramref name="newSymbol"/> is null and the edit isn't a <see cref="
SemanticEditKind
.Insert"/> or <see cref="
SemanticEditKind
.Delete"/>, respectively.
104
public SemanticEdit(
SemanticEditKind
kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap = null, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdit = null, MethodInstrumentation instrumentation = default)
106
if (kind <=
SemanticEditKind
.None || kind >
SemanticEditKind
.Replace)
111
if (oldSymbol == null && kind is not (
SemanticEditKind
.Insert or
SemanticEditKind
.Replace))
129
if (kind !=
SemanticEditKind
.Update)
155
if (kind ==
SemanticEditKind
.Delete && oldSymbol is not (IMethodSymbol or IPropertySymbol or IEventSymbol))
167
if (kind !=
SemanticEditKind
.Update)
208
Kind =
SemanticEditKind
.Update;
215
internal static SemanticEdit Create(
SemanticEditKind
kind, ISymbolInternal oldSymbol, ISymbolInternal newSymbol, Func<SyntaxNode, SyntaxNode>? syntaxMap = null)
Microsoft.CodeAnalysis.Features (40)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (17)
2793
SemanticEditKind
editKind;
2908
editKind =
SemanticEditKind
.Update;
3062
editKind =
SemanticEditKind
.Insert;
3070
editKind =
SemanticEditKind
.Update;
3198
Contract.ThrowIfFalse(editKind ==
SemanticEditKind
.Insert);
3223
editKind =
SemanticEditKind
.Update;
3247
editKind =
SemanticEditKind
.Update;
3345
Contract.ThrowIfFalse(editKind is
SemanticEditKind
.Update or
SemanticEditKind
.Insert);
3348
if (editKind ==
SemanticEditKind
.Update)
3482
var partialType = editKind ==
SemanticEditKind
.Update && symbol.IsPartialImplementation()
3490
SemanticEditKind
.Update => SemanticEditInfo.CreateUpdate(symbolKey, syntaxMaps, partialType),
3491
SemanticEditKind
.Insert => SemanticEditInfo.CreateInsert(symbolKey, partialType),
3492
SemanticEditKind
.Replace => SemanticEditInfo.CreateReplace(symbolKey, partialType),
3882
/// Add <see cref="
SemanticEditKind
.Update"/> edit for the specified symbol and its accessors.
3919
/// Add <see cref="
SemanticEditKind
.Delete"/> edit for the specified symbol and its accessors.
3958
/// Add <see cref="
SemanticEditKind
.Insert"/> edit for the specified symbol and its accessors.
EditAndContinue\EditSession.cs (9)
881
if (edit.Kind ==
SemanticEditKind
.Insert)
908
.Where(static edit => edit is { PartialType: not null, Kind:
SemanticEditKind
.Update })
983
var syntaxMaps = (edit.Kind ==
SemanticEditKind
.Update) ? mergedUpdateEditSyntaxMaps[edit.PartialType.Value] : default;
1002
if (edit.Kind is
SemanticEditKind
.Update or
SemanticEditKind
.Delete)
1013
if (edit.Kind is
SemanticEditKind
.Update or
SemanticEditKind
.Insert or
SemanticEditKind
.Replace)
1018
else if (edit is { Kind:
SemanticEditKind
.Delete, DeletedSymbolContainer: not null })
EditAndContinue\SemanticEditInfo.cs (14)
43
SemanticEditKind
kind,
49
Debug.Assert(kind ==
SemanticEditKind
.Delete || deletedSymbolContainer == null);
59
=> new(
SemanticEditKind
.Insert, symbol, syntaxMaps: default, partialType, deletedSymbolContainer: null);
69
=> new(
SemanticEditKind
.Update, symbol, syntaxMaps, partialType, deletedSymbolContainer: null);
79
=> new(
SemanticEditKind
.Replace, symbol, syntaxMaps: default, partialType, deletedSymbolContainer: null);
82
=> new(
SemanticEditKind
.Delete, symbol, syntaxMaps: default, partialType, deletedSymbolContainer);
92
/// <see cref="
SemanticEditKind
.Insert"/> or <see cref="
SemanticEditKind
.Update"/> or <see cref="
SemanticEditKind
.Delete"/>.
94
public
SemanticEditKind
Kind { get; }
97
/// If <see cref="Kind"/> is <see cref="
SemanticEditKind
.Insert"/> represents the inserted symbol in the new compilation.
98
/// If <see cref="Kind"/> is <see cref="
SemanticEditKind
.Update"/> represents the updated symbol in both compilations.
99
/// If <see cref="Kind"/> is <see cref="
SemanticEditKind
.Delete"/> represents the deleted symbol in the old compilation.
108
/// If <see cref="Kind"/> is <see cref="
SemanticEditKind
.Delete"/> represents the containing symbol in the new compilation.