public SemanticEditDescription(SemanticEditKind kind, Func<Compilation, ISymbol> symbolProvider, IEnumerable<KeyValuePair<TextSpan, TextSpan>> syntaxMap, bool preserveLocalVariables)
 {
     this.Kind = kind;
     this.SymbolProvider = symbolProvider;
     this.SyntaxMap = syntaxMap;
     this.PreserveLocalVariables = preserveLocalVariables;
 }
Beispiel #2
0
 internal static SemanticEditDescription SemanticEdit(SemanticEditKind kind, Func<Compilation, ISymbol> symbolProvider, bool preserveLocalVariables = false)
 {
     return new SemanticEditDescription(kind, symbolProvider, null, preserveLocalVariables);
 }
Beispiel #3
0
 internal static SemanticEditDescription SemanticEdit(SemanticEditKind kind, Func<Compilation, ISymbol> symbolProvider, IEnumerable<KeyValuePair<TextSpan, TextSpan>> syntaxMap)
 {
     Assert.NotNull(syntaxMap);
     return new SemanticEditDescription(kind, symbolProvider, syntaxMap, preserveLocalVariables: true);
 }
 internal static SemanticEdit Create(SemanticEditKind kind, ISymbolInternal oldSymbol, ISymbolInternal newSymbol, Func <SyntaxNode, SyntaxNode>?syntaxMap = null, bool preserveLocalVariables = false)
 {
     return(new SemanticEdit(kind, oldSymbol?.GetISymbol(), newSymbol?.GetISymbol(), syntaxMap, preserveLocalVariables));
 }
Beispiel #5
0
 internal static SemanticEditDescription SemanticEdit(SemanticEditKind kind, Func <Compilation, ISymbol> symbolProvider, bool preserveLocalVariables = false)
 {
     return(new SemanticEditDescription(kind, symbolProvider, null, preserveLocalVariables));
 }
Beispiel #6
0
 internal static SemanticEditDescription SemanticEdit(SemanticEditKind kind, Func <Compilation, ISymbol> symbolProvider, IEnumerable <KeyValuePair <TextSpan, TextSpan> > syntaxMap)
 {
     Assert.NotNull(syntaxMap);
     return(new SemanticEditDescription(kind, symbolProvider, syntaxMap, preserveLocalVariables: true));
 }
 internal static SemanticEditDescription Edit(SemanticEditKind kind, Func <Compilation, ISymbol> symbolProvider)
 => new(kind, symbolProvider);