GeneratorDriver.RunGenerators Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RunGenerators(Compilation) |
Run generators and produce an updated GeneratorDriver containing the results. |
RunGenerators(Compilation, CancellationToken) | |
RunGenerators(Compilation, Func<GeneratorFilterContext,Boolean>, CancellationToken) |
Run generators and produce an updated GeneratorDriver containing the results. |
RunGenerators(Compilation)
- Source:
- GeneratorDriver.cs
Run generators and produce an updated GeneratorDriver containing the results.
public Microsoft.CodeAnalysis.GeneratorDriver RunGenerators (Microsoft.CodeAnalysis.Compilation compilation);
member this.RunGenerators : Microsoft.CodeAnalysis.Compilation -> Microsoft.CodeAnalysis.GeneratorDriver
Public Function RunGenerators (compilation As Compilation) As GeneratorDriver
Parameters
- compilation
- Compilation
The compilation to run generators against
Returns
An updated driver that contains the results of the generators running.
Applies to
RunGenerators(Compilation, CancellationToken)
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
- Source:
- GeneratorDriver.cs
public Microsoft.CodeAnalysis.GeneratorDriver RunGenerators (Microsoft.CodeAnalysis.Compilation compilation, System.Threading.CancellationToken cancellationToken = default);
public Microsoft.CodeAnalysis.GeneratorDriver RunGenerators (Microsoft.CodeAnalysis.Compilation compilation, System.Threading.CancellationToken cancellationToken);
member this.RunGenerators : Microsoft.CodeAnalysis.Compilation * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.GeneratorDriver
Public Function RunGenerators (compilation As Compilation, Optional cancellationToken As CancellationToken = Nothing) As GeneratorDriver
Public Function RunGenerators (compilation As Compilation, cancellationToken As CancellationToken) As GeneratorDriver
Parameters
- compilation
- Compilation
- cancellationToken
- CancellationToken
Returns
Applies to
RunGenerators(Compilation, Func<GeneratorFilterContext,Boolean>, CancellationToken)
- Source:
- GeneratorDriver.cs
Run generators and produce an updated GeneratorDriver containing the results.
public Microsoft.CodeAnalysis.GeneratorDriver RunGenerators (Microsoft.CodeAnalysis.Compilation compilation, Func<Microsoft.CodeAnalysis.GeneratorFilterContext,bool>? generatorFilter, System.Threading.CancellationToken cancellationToken = default);
member this.RunGenerators : Microsoft.CodeAnalysis.Compilation * Func<Microsoft.CodeAnalysis.GeneratorFilterContext, bool> * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.GeneratorDriver
Public Function RunGenerators (compilation As Compilation, generatorFilter As Func(Of GeneratorFilterContext, Boolean), Optional cancellationToken As CancellationToken = Nothing) As GeneratorDriver
Parameters
- compilation
- Compilation
The compilation to run generators against
- generatorFilter
- Func<GeneratorFilterContext,Boolean>
A filter that specifies which generators to run. If null
all generators will run.
- cancellationToken
- CancellationToken
Used to cancel an in progress operation.
Returns
An updated driver that contains the results of the generators running.
Applies to
.NET