Ejemplo n.º 1
0
 public GeneratorState(GeneratorInfo info)
     : this(info, ImmutableArray <GeneratedSourceText> .Empty, ImmutableArray <SyntaxTree> .Empty, ImmutableArray <Diagnostic> .Empty, syntaxReceiver : null, exception : null)
 {
 }
Ejemplo n.º 2
0
 public GeneratorState(GeneratorInfo info, Exception e, Diagnostic error)
     : this(info, ImmutableArray <GeneratedSourceText> .Empty, ImmutableArray <SyntaxTree> .Empty, ImmutableArray.Create(error), syntaxReceiver : null, exception : e)
 {
 }
Ejemplo n.º 3
0
 internal override bool AcceptedBy(GeneratorInfo info) => info.EditCallback is object;
Ejemplo n.º 4
0
 internal override bool TryApply(GeneratorInfo info, GeneratorEditContext context) => info.EditCallback !.Invoke(context, this);
Ejemplo n.º 5
0
 internal abstract bool AcceptedBy(GeneratorInfo info);
Ejemplo n.º 6
0
 internal abstract bool TryApply(GeneratorInfo info, GeneratorEditContext context);
Ejemplo n.º 7
0
 public GeneratorState(GeneratorInfo info)
     : this(info, ImmutableDictionary <GeneratedSourceText, SyntaxTree> .Empty)
 {
 }
Ejemplo n.º 8
0
 private GeneratorState(GeneratorInfo info, ImmutableDictionary <GeneratedSourceText, SyntaxTree> sources)
 {
     this.Sources = sources;
     this.Info    = info;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a generator state that contains results
 /// </summary>
 public GeneratorState(GeneratorInfo info, ImmutableArray <GeneratedSyntaxTree> postInitTrees, ImmutableArray <ISyntaxInputNode> inputNodes, ImmutableArray <IIncrementalGeneratorOutputNode> outputNodes, ImmutableArray <GeneratedSyntaxTree> generatedTrees, ImmutableArray <Diagnostic> diagnostics, TimeSpan elapsedTime)
     : this(info, postInitTrees, inputNodes, outputNodes, generatedTrees, diagnostics, exception : null, elapsedTime)
 {
 }
 /// <summary>
 /// Creates a generator state that contains results
 /// </summary>
 public GeneratorState(GeneratorInfo info, ImmutableArray <GeneratedSyntaxTree> postInitTrees, ImmutableArray <GeneratedSyntaxTree> generatedTrees, ImmutableArray <Diagnostic> diagnostics)
     : this(info, postInitTrees, generatedTrees, diagnostics, syntaxReceiver : null, exception : null)
 {
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Creates a new generator state that contains an exception and the associated diagnostic
 /// </summary>
 public GeneratorState(GeneratorInfo info, Exception e, Diagnostic error, TimeSpan elapsedTime)
     : this(info, ImmutableArray <GeneratedSyntaxTree> .Empty, ImmutableArray <ISyntaxInputNode> .Empty, ImmutableArray <IIncrementalGeneratorOutputNode> .Empty, ImmutableArray <GeneratedSyntaxTree> .Empty, ImmutableArray.Create(error), exception : e, elapsedTime)
 {
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Creates a new generator state that contains information, constant trees and an execution pipeline
 /// </summary>
 public GeneratorState(GeneratorInfo info, ImmutableArray <GeneratedSyntaxTree> postInitTrees, ImmutableArray <ISyntaxInputNode> inputNodes, ImmutableArray <IIncrementalGeneratorOutputNode> outputNodes)
     : this(info, postInitTrees, inputNodes, outputNodes, ImmutableArray <GeneratedSyntaxTree> .Empty, ImmutableArray <Diagnostic> .Empty, exception : null, elapsedTime : TimeSpan.Zero)
 {
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Creates a new generator state that contains information and constant trees
 /// </summary>
 public GeneratorState(GeneratorInfo info, ImmutableArray <GeneratedSyntaxTree> postInitTrees)
     : this(info, postInitTrees, ImmutableArray <ISyntaxInputNode> .Empty, ImmutableArray <IIncrementalGeneratorOutputNode> .Empty)
 {
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Creates a new generator state that just contains information
 /// </summary>
 public GeneratorState(GeneratorInfo info)
     : this(info, ImmutableArray <GeneratedSyntaxTree> .Empty)
 {
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Creates a generator state that contains results
 /// </summary>
 public GeneratorState(GeneratorInfo info, ImmutableArray <GeneratedSourceText> sourceTexts, ImmutableArray <SyntaxTree> trees, ImmutableArray <Diagnostic> diagnostics)
     : this(info, sourceTexts, trees, diagnostics, syntaxReceiver : null, exception : null)
 {
 }