CSharpGeneratorDriver Class

Definition

A GeneratorDriver implementation for the CSharp language.

C#
public sealed class CSharpGeneratorDriver : Microsoft.CodeAnalysis.GeneratorDriver
Inheritance
CSharpGeneratorDriver

Constructors

Methods

AddAdditionalTexts(ImmutableArray<AdditionalText>) (Inherited from GeneratorDriver)
AddGenerators(ImmutableArray<ISourceGenerator>) (Inherited from GeneratorDriver)
Create(IEnumerable<ISourceGenerator>, IEnumerable<AdditionalText>, CSharpParseOptions, AnalyzerConfigOptionsProvider, GeneratorDriverOptions)

Creates a new instance of CSharpGeneratorDriver with the specified ISourceGenerators and the provided options or default.

Create(IEnumerable<ISourceGenerator>, IEnumerable<AdditionalText>, CSharpParseOptions, AnalyzerConfigOptionsProvider)

Creates a new instance of CSharpGeneratorDriver with the specified ISourceGenerators and the provided options or default.

Create(IIncrementalGenerator[])

Creates a new instance of CSharpGeneratorDriver with the specified IIncrementalGenerators and default options

Create(ISourceGenerator[])

Creates a new instance of CSharpGeneratorDriver with the specified ISourceGenerators and default options

GetRunResult() (Inherited from GeneratorDriver)
GetTimingInfo() (Inherited from GeneratorDriver)
RemoveAdditionalTexts(ImmutableArray<AdditionalText>) (Inherited from GeneratorDriver)
RemoveGenerators(ImmutableArray<ISourceGenerator>) (Inherited from GeneratorDriver)
ReplaceAdditionalText(AdditionalText, AdditionalText) (Inherited from GeneratorDriver)
ReplaceAdditionalTexts(ImmutableArray<AdditionalText>) (Inherited from GeneratorDriver)
ReplaceGenerators(ImmutableArray<ISourceGenerator>) (Inherited from GeneratorDriver)
RunFullGeneration(Compilation, Compilation, ImmutableArray<Diagnostic>, CancellationToken) (Inherited from GeneratorDriver)
RunGenerators(Compilation, CancellationToken) (Inherited from GeneratorDriver)
RunGenerators(Compilation, Func<GeneratorFilterContext,Boolean>, CancellationToken)

Run generators and produce an updated GeneratorDriver containing the results.

(Inherited from GeneratorDriver)
RunGenerators(Compilation)

Run generators and produce an updated GeneratorDriver containing the results.

(Inherited from GeneratorDriver)
RunGeneratorsAndUpdateCompilation(Compilation, Compilation, ImmutableArray<Diagnostic>, CancellationToken) (Inherited from GeneratorDriver)
TryApplyEdits(Compilation, Compilation, Boolean, CancellationToken) (Inherited from GeneratorDriver)
WithUpdatedAnalyzerConfigOptions(AnalyzerConfigOptionsProvider) (Inherited from GeneratorDriver)
WithUpdatedParseOptions(ParseOptions) (Inherited from GeneratorDriver)

Applies to

Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0