32 implementations of ISourceGenerator
Microsoft.CodeAnalysis (1)
SourceGeneration\IncrementalWrapper.cs (1)
19
internal sealed class IncrementalGeneratorWrapper :
ISourceGenerator
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
14715
internal class FailsExecuteGenerator :
ISourceGenerator
14760
internal class FailsInitializeGenerator :
ISourceGenerator
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4519
private sealed class ConvertToRecordTestGenerator :
ISourceGenerator
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeFixes\CodeFixServiceTests.cs (1)
602
public class MockGenerator :
ISourceGenerator
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Rename\CSharp\SourceGeneratorTests.vb (1)
80
Implements
ISourceGenerator
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
DeterministicKeyBuilderTests.Helpers.cs (2)
44
private sealed class Generator :
ISourceGenerator
51
private sealed class Generator2 :
ISourceGenerator
Microsoft.CodeAnalysis.Test.Utilities (3)
SourceGeneration\TestGenerators.cs (2)
18
internal class SingleFileTestGenerator :
ISourceGenerator
51
internal class DiagnosticProducingGenerator :
ISourceGenerator
SourceGeneration\TestSourceGenerator.cs (1)
12
internal class TestSourceGenerator :
ISourceGenerator
Microsoft.CodeAnalysis.TestAnalyzerReference (1)
HelloWorldGenerator.cs (1)
13
public sealed class HelloWorldGenerator :
ISourceGenerator
Microsoft.CodeAnalysis.UnitTests (6)
Analyzers\AnalyzerFileReferenceTests.cs (6)
617
public class TestGenerator :
ISourceGenerator
633
public class NestedGenerator :
ISourceGenerator
683
public class TestGenerator :
ISourceGenerator
689
public class TestGeneratorNoAttrib :
ISourceGenerator
696
public class BaseGenerator :
ISourceGenerator
738
public class TestSourceAndIncrementalGenerator : IIncrementalGenerator,
ISourceGenerator
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests.vb (2)
748
Implements
ISourceGenerator
796
Implements
ISourceGenerator
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
17
public sealed class ComplianceReportsGenerator :
ISourceGenerator
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
333
private sealed class Generator :
ISourceGenerator
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
333
private sealed class Generator :
ISourceGenerator
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
333
private sealed class Generator :
ISourceGenerator
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
333
private sealed class Generator :
ISourceGenerator
Microsoft.Gen.MetricsReports (1)
MetricsReportsGenerator.cs (1)
18
public class MetricsReportsGenerator :
ISourceGenerator
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
333
private sealed class Generator :
ISourceGenerator
Microsoft.ML.AutoML.SourceGenerator (4)
EstimatorTypeGenerator.cs (1)
18
public sealed class EstimatorTypeGenerator :
ISourceGenerator
SearchSpaceGenerator.cs (1)
18
public sealed class SearchSpaceGenerator :
ISourceGenerator
SweepableEstimatorFactoryGenerator.cs (1)
16
public sealed class SweepableEstimatorFactoryGenerator :
ISourceGenerator
SweepableEstimatorGenerator.cs (1)
15
public sealed class SweepableEstimatorGenerator :
ISourceGenerator
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Roslyn3.11.cs (1)
21
public sealed partial class JsonSourceGenerator :
ISourceGenerator
451 references to ISourceGenerator
IdeCoreBenchmarks (2)
IncrementalSourceGeneratorBenchmarks.cs (2)
105
var
generator = (new PipelineCallbackGenerator(ctx =>
138
new
ISourceGenerator
[] { generator }, parseOptions: CSharpParseOptions.Default);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
175
ISourceGenerator
generator,
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
175
ISourceGenerator
generator,
Microsoft.AspNetCore.Http.Extensions.Tests (9)
RequestDelegateGenerator\CompileTimeCreationTests.cs (8)
60
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
86
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
168
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
235
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
289
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
336
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
672
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
729
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
57
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
Microsoft.AspNetCore.Http.Microbenchmarks (2)
RequestDelegateGeneratorBenchmarks.cs (1)
35
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
57
var
generator = new RequestDelegateGenerator.RequestDelegateGenerator().AsSourceGenerator();
Microsoft.CodeAnalysis (83)
CommandLine\CommandLineArguments.cs (2)
478
out ImmutableArray<
ISourceGenerator
> generators)
481
var generatorBuilder = ImmutableArray.CreateBuilder<
ISourceGenerator
>();
CommandLine\CommonCompiler.cs (6)
123
out ImmutableArray<
ISourceGenerator
> generators);
817
ImmutableArray<
ISourceGenerator
> generators,
866
foreach (
var
generator in generators)
877
private protected abstract GeneratorDriver CreateGeneratorDriver(string baseDirectory, ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider, ImmutableArray<AdditionalText> additionalTexts);
1098
ImmutableArray<
ISourceGenerator
> generators,
1748
ImmutableArray<
ISourceGenerator
> generators,
Compilation\Compilation.cs (2)
201
ImmutableArray<
ISourceGenerator
> generators = default,
213
ImmutableArray<
ISourceGenerator
> generators = default,
Compilation\DeterministicKey.cs (2)
57
ImmutableArray<
ISourceGenerator
> generators = default,
84
ImmutableArray<
ISourceGenerator
> generators = default,
Compilation\DeterministicKeyBuilder.cs (2)
127
ImmutableArray<
ISourceGenerator
> generators,
186
foreach (
var
generator in generators)
DiagnosticAnalyzer\AnalyzerFileReference.cs (7)
40
private readonly Extensions<
ISourceGenerator
> _generators;
121
public override ImmutableArray<
ISourceGenerator
> GetGeneratorsForAllLanguages()
127
public override ImmutableArray<
ISourceGenerator
> GetGenerators()
132
public override ImmutableArray<
ISourceGenerator
> GetGenerators(string language)
193
/// Adds the <see cref="ImmutableArray{T}"/> of <see cref="
ISourceGenerator
"/> defined in this assembly reference of given <paramref name="language"/>.
195
internal void AddGenerators(ImmutableArray<
ISourceGenerator
>.Builder builder, string language)
341
private static
ISourceGenerator
? CoerceGeneratorType(object? generator)
DiagnosticAnalyzer\AnalyzerReference.cs (6)
67
public virtual ImmutableArray<
ISourceGenerator
> GetGeneratorsForAllLanguages() => ImmutableArray<
ISourceGenerator
>.Empty;
70
public virtual ImmutableArray<
ISourceGenerator
> GetGenerators() => ImmutableArray<
ISourceGenerator
>.Empty;
76
public virtual ImmutableArray<
ISourceGenerator
> GetGenerators(string language) => ImmutableArray<
ISourceGenerator
>.Empty;
SourceGeneration\GeneratedSourceText.cs (1)
12
/// A source text created by an <see cref="
ISourceGenerator
"/>
SourceGeneration\GeneratedSyntaxTree.cs (1)
10
/// A syntax tree created by a <see cref="
ISourceGenerator
"/>
SourceGeneration\GeneratorAdaptor.cs (2)
25
internal
ISourceGenerator
SourceGenerator { get; }
27
public SourceGeneratorAdaptor(
ISourceGenerator
generator, string sourceExtension)
SourceGeneration\GeneratorContexts.cs (5)
16
/// Context passed to a source generator when <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/> is called
128
/// Context passed to a source generator when <see cref="
ISourceGenerator
.Initialize(GeneratorInitializationContext)"/> is called
153
/// During <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/> the generator can obtain the <see cref="ISyntaxReceiver"/> instance that was
175
/// During <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/> the generator can obtain the <see cref="ISyntaxContextReceiver"/> instance that was
179
/// A new instance of <see cref="ISyntaxContextReceiver"/> is created prior to every call to <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/>,
SourceGeneration\GeneratorDriver.cs (13)
37
internal GeneratorDriver(ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, GeneratorDriverOptions driverOptions)
85
public GeneratorDriver AddGenerators(ImmutableArray<
ISourceGenerator
> generators)
94
public GeneratorDriver ReplaceGenerators(ImmutableArray<
ISourceGenerator
> generators)
99
foreach (
var
generator in generators)
116
public GeneratorDriver RemoveGenerators(ImmutableArray<
ISourceGenerator
> generators)
232
var
sourceGenerator = state.Generators[i];
339
static bool handleGeneratorException(Compilation compilation, CommonMessageProvider messageProvider,
ISourceGenerator
sourceGenerator, Exception e, bool isInit)
351
bool shouldSkipGenerator(
ISourceGenerator
generator) => generatorFilter?.Invoke(new GeneratorFilterContext(generator, cancellationToken)) == false;
369
private ImmutableArray<GeneratedSyntaxTree> ParseAdditionalSources(
ISourceGenerator
generator, ImmutableArray<GeneratedSourceText> generatedSources, CancellationToken cancellationToken)
381
private static GeneratorState SetGeneratorException(Compilation compilation, CommonMessageProvider provider, GeneratorState generatorState,
ISourceGenerator
generator, Exception e, DiagnosticBag? diagnosticBag, CancellationToken cancellationToken, TimeSpan? runTime = null, bool isInit = false)
399
private static Diagnostic CreateGeneratorExceptionDiagnostic(CommonMessageProvider provider,
ISourceGenerator
generator, Exception e, bool isInit)
440
internal static string GetFilePathPrefixForGenerator(string? baseDirectory,
ISourceGenerator
generator)
446
private static ImmutableArray<IIncrementalGenerator> GetIncrementalGenerators(ImmutableArray<
ISourceGenerator
> generators, string sourceExtension)
SourceGeneration\GeneratorDriverState.cs (5)
16
ImmutableArray<
ISourceGenerator
> sourceGenerators,
42
/// The set of <see cref="
ISourceGenerator
"/>s associated with this state.
48
internal readonly ImmutableArray<
ISourceGenerator
> Generators;
55
/// where each entry is either the unwrapped incremental generator or a wrapped <see cref="
ISourceGenerator
"/>
106
ImmutableArray<
ISourceGenerator
>? sourceGenerators = null,
SourceGeneration\GeneratorExtensions.cs (7)
18
/// <see cref="
ISourceGenerator
"/>. This method will unwrap and return the underlying type
23
public static Type GetGeneratorType(this
ISourceGenerator
generator)
47
/// Converts an <see cref="IIncrementalGenerator"/> into an <see cref="
ISourceGenerator
"/> object that can be used when constructing a <see cref="GeneratorDriver"/>
50
/// <returns>An <see cref="
ISourceGenerator
"/> that can be passed to a generator driver</returns>
51
public static
ISourceGenerator
AsSourceGenerator(this IIncrementalGenerator incrementalGenerator) => incrementalGenerator switch
58
/// Converts an <see cref="
ISourceGenerator
"/> into an <see cref="IIncrementalGenerator"/>
62
public static IIncrementalGenerator AsIncrementalGenerator(this
ISourceGenerator
sourceGenerator) => sourceGenerator switch
SourceGeneration\GeneratorTimerExtensions.cs (1)
30
public static RunTimer CreateSingleGeneratorRunTimer(this CodeAnalysisEventSource eventSource,
ISourceGenerator
generator, Func<TimeSpan, TimeSpan> adjustRunTime)
SourceGeneration\IncrementalContexts.cs (2)
193
internal GeneratorFilterContext(
ISourceGenerator
generator, CancellationToken cancellationToken)
202
public
ISourceGenerator
Generator { get; }
SourceGeneration\IncrementalWrapper.cs (3)
13
/// Wraps an incremental generator in a dummy <see cref="
ISourceGenerator
"/> interface.
29
void
ISourceGenerator
.Execute(GeneratorExecutionContext context) => throw ExceptionUtilities.Unreachable();
31
void
ISourceGenerator
.Initialize(GeneratorInitializationContext context) => throw ExceptionUtilities.Unreachable();
SourceGeneration\ISyntaxReceiver.cs (6)
11
/// A <see cref="
ISourceGenerator
"/> can provide an instance of <see cref="ISyntaxReceiver"/>
19
/// <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/> the generator can obtain the
26
/// An <see cref="
ISourceGenerator
"/> may provide only a single <see cref="ISyntaxReceiver"/> or
50
/// A <see cref="
ISourceGenerator
"/> can provide an instance of <see cref="ISyntaxContextReceiver"/>
59
/// During <see cref="
ISourceGenerator
.Execute(GeneratorExecutionContext)"/> the generator can obtain the
66
/// An <see cref="
ISourceGenerator
"/> may provide only a single <see cref="ISyntaxReceiver"/> or
SourceGeneration\RunResults.cs (10)
15
/// Represents the results of running a generation pass over a set of <see cref="
ISourceGenerator
"/>s.
30
/// The individual result of each <see cref="
ISourceGenerator
"/> that was run in this generator pass, one per generator.
77
/// Represents the results of a single <see cref="
ISourceGenerator
"/> generation pass.
82
ISourceGenerator
generator,
106
/// The <see cref="
ISourceGenerator
"/> that produced this result.
108
public
ISourceGenerator
Generator { get; }
163
/// Represents the results of an <see cref="
ISourceGenerator
"/> calling <see cref="GeneratorExecutionContext.AddSource(string, SourceText)"/>.
223
internal GeneratorTimingInfo(
ISourceGenerator
generator, TimeSpan elapsedTime)
230
/// The <see cref="
ISourceGenerator
"/> that was running during the recorded time.
232
public
ISourceGenerator
Generator { get; }
Microsoft.CodeAnalysis.CSharp (8)
CommandLine\CSharpCompiler.cs (2)
339
out ImmutableArray<
ISourceGenerator
> generators)
376
private protected override GeneratorDriver CreateGeneratorDriver(string baseDirectory, ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider, ImmutableArray<AdditionalText> additionalTexts)
SourceGeneration\CSharpGeneratorDriver.cs (6)
27
internal CSharpGeneratorDriver(CSharpParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, GeneratorDriverOptions driverOptions)
38
/// Creates a new instance of <see cref="CSharpGeneratorDriver"/> with the specified <see cref="
ISourceGenerator
"/>s and default options
42
public static CSharpGeneratorDriver Create(params
ISourceGenerator
[] generators)
54
/// Creates a new instance of <see cref="CSharpGeneratorDriver"/> with the specified <see cref="
ISourceGenerator
"/>s and the provided options or default.
62
public static CSharpGeneratorDriver Create(IEnumerable<
ISourceGenerator
> generators, IEnumerable<AdditionalText>? additionalTexts = null, CSharpParseOptions? parseOptions = null, AnalyzerConfigOptionsProvider? optionsProvider = null, GeneratorDriverOptions driverOptions = default)
67
public static CSharpGeneratorDriver Create(IEnumerable<
ISourceGenerator
> generators, IEnumerable<AdditionalText>? additionalTexts, CSharpParseOptions? parseOptions, AnalyzerConfigOptionsProvider? optionsProvider)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTestBase.cs (2)
55
internal MockCSharpCompiler CreateCSharpCompiler(string[] args, DiagnosticAnalyzer[]? analyzers = null,
ISourceGenerator
[]? generators = null, AnalyzerAssemblyLoader? loader = null, GeneratorDriverCache? driverCache = null, MetadataReference[]? additionalReferences = null)
60
internal MockCSharpCompiler CreateCSharpCompiler(string? responseFile, string workingDirectory, string[] args, DiagnosticAnalyzer[]? analyzers = null,
ISourceGenerator
[]? generators = null, AnalyzerAssemblyLoader? loader = null, GeneratorDriverCache? driverCache = null, MetadataReference[]? additionalReferences = null)
CommandLineTests.cs (3)
10531
ISourceGenerator
[] generators = null,
14207
references: TargetFrameworkUtil.NetStandard20References.Add(MetadataReference.CreateFromAssemblyInternal(typeof(
ISourceGenerator
).Assembly)),
15357
TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { MetadataReference.CreateFromAssemblyInternal(typeof(
ISourceGenerator
).Assembly) }),
GeneratorDriverCacheTests.cs (1)
101
private static GeneratorDriver[] GetDrivers(int count) => Enumerable.Range(0, count).Select(i => CSharpGeneratorDriver.Create(Array.Empty<
ISourceGenerator
>())).ToArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (153)
SourceGeneration\GeneratorDriverTests.cs (59)
40
GeneratorDriver driver = CSharpGeneratorDriver.Create(ImmutableArray<
ISourceGenerator
>.Empty, parseOptions: parseOptions);
545
GeneratorDriver driver = CSharpGeneratorDriver.Create(ImmutableArray<
ISourceGenerator
>.Empty, parseOptions: TestOptions.Regular);
620
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator, generator2, generator3 }, parseOptions: parseOptions);
1065
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1094
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator, generator2, generator3 }, parseOptions: parseOptions);
1137
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1399
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator, generator2, generator3 }, parseOptions: parseOptions);
1428
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1450
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1475
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1547
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1580
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator, generator2 }, parseOptions: parseOptions);
1604
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1625
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
1691
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1740
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, additionalTexts: new[] { text1 }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1960
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
2000
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, additionalTexts: texts, driverOptions: TestOptions.GeneratorDriverOptions);
2263
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
2399
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
2472
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
2633
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, optionsProvider: optionsProvider, driverOptions: TestOptions.GeneratorDriverOptions);
2711
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, additionalTexts: new[] { additionalText1, additionalText2, additionalText3 }, driverOptions: TestOptions.GeneratorDriverOptions);
2901
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, additionalTexts: new[] { additionalText }, driverOptions: TestOptions.GeneratorDriverOptions);
3238
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
3387
var
generator = new PipelineCallbackGenerator(ctx =>
3415
var
generator = new PipelineCallbackGenerator(ctx =>
3446
var
generator = new PipelineCallbackGenerator(ctx =>
3455
var
generator2 = new PipelineCallbackGenerator2(ctx =>
3494
var
generator = new PipelineCallbackGenerator(ctx =>
3538
var
generator = new PipelineCallbackGenerator(ctx =>
3569
var
generator = new PipelineCallbackGenerator(ctx =>
3613
var
generator = new PipelineCallbackGenerator(ctx =>
3645
var
generator = new PipelineCallbackGenerator(ctx =>
3739
var
generator = new PipelineCallbackGenerator(ctx =>
3771
var
generator = new PipelineCallbackGenerator(ctx =>
3863
var
generator = new PipelineCallbackGenerator(ctx =>
3939
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator });
3956
driver = driver.AddGenerators(ImmutableArray.Create<
ISourceGenerator
>(generator2));
3982
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator });
3994
driver = driver.AddGenerators(ImmutableArray.Create<
ISourceGenerator
>(generator2));
4022
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
4037
driver = driver.AddGenerators(ImmutableArray.Create<
ISourceGenerator
>(generator2));
4248
ISourceGenerator
generator = new TestSourceGenerator();
4251
var
sourceGenerator = incrementalGenerator.AsSourceGenerator();
4259
ISourceGenerator
generator = new TestSourceGenerator();
4272
var
sourceGenerator = generator.AsSourceGenerator();
4283
var
sourceGenerator = generator.AsSourceGenerator();
4293
ISourceGenerator
generator = new TestSourceGenerator() { ExecuteImpl = (context) => { executeCalled = true; } };
4306
var
generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4307
var
generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4351
var
generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator1"); }); }).AsSourceGenerator();
4352
var
generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator2"); }); }).AsSourceGenerator();
4375
var
generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4376
var
generator2 = new PipelineCallbackGenerator2((ctx) => { initWasCalled = true; ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4404
var
generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { stepRan = true; }); }).AsSourceGenerator();
4460
var
generator = new PipelineCallbackGenerator((ctx) => { ctx.RegisterPostInitializationOutput(postInitCtx => { postInitCtx.AddSource("staticSource.cs", "//static"); }); }).AsSourceGenerator();
4480
var
generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterPostInitializationOutput(postInitCtx => { postInitCtx.AddSource("staticSource.cs", "//static"); }); }).AsSourceGenerator();
4481
var
generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterPostInitializationOutput(postInitCtx => { postInitCtx.AddSource("staticSource2.cs", "//static 2"); }); }).AsSourceGenerator();
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (43)
78
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
120
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
157
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
187
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
217
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
244
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
271
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
299
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
330
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
366
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
405
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
434
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
467
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
500
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
532
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
564
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
595
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
626
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
659
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
690
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
719
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
753
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
782
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
819
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
856
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
893
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
930
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
967
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1003
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1038
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1075
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1113
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1151
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1189
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1227
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1424
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1471
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1518
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1561
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1609
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1662
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1721
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1773
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (46)
49
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
81
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
107
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
132
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
157
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
185
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
217
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
249
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
283
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
316
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
342
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
368
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
394
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
427
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
455
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
483
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
510
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
541
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
574
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
606
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
638
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
666
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
694
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
722
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
749
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
776
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
805
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
836
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
866
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
895
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
923
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
951
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
980
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1012
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1052
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1098
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1151
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1202
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1257
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1310
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1368
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1416
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1461
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1512
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1563
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
1624
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions, driverOptions: TestOptions.GeneratorDriverOptions);
SourceGeneration\StateTableTests.cs (1)
1349
ImmutableArray<
ISourceGenerator
>.Empty,
SourceGeneration\SyntaxAwareGeneratorTests.cs (4)
1995
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
2024
GeneratorDriver driver = CSharpGeneratorDriver.Create(new
ISourceGenerator
[] { generator }, parseOptions: parseOptions);
2085
var
testGenerator = new PipelineCallbackGenerator(ctx =>
2090
var
testGenerator2 = new PipelineCallbackGenerator2(ctx =>
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
MockCSharpCompiler.cs (5)
20
private readonly ImmutableArray<
ISourceGenerator
> _generators;
27
public MockCSharpCompiler(string responseFile, string workingDirectory, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<
ISourceGenerator
> generators = default, AnalyzerAssemblyLoader loader = null, ImmutableArray<MetadataReference> additionalReferences = default)
32
public MockCSharpCompiler(string responseFile, BuildPaths buildPaths, string[] args, ImmutableArray<DiagnosticAnalyzer> analyzers = default, ImmutableArray<
ISourceGenerator
> generators = default, AnalyzerAssemblyLoader loader = null, GeneratorDriverCache driverCache = null, ImmutableArray<MetadataReference> additionalReferences = default)
48
out ImmutableArray<
ISourceGenerator
> generators)
65
out ImmutableArray<
ISourceGenerator
> generators)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpCompilationFactoryService.cs (1)
56
GeneratorDriver ICompilationFactoryService.CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
421
protected static async Task<AnalyzerReference> AddGeneratorAsync(
ISourceGenerator
generator, EditorTestWorkspace workspace)
Workspaces\EditorTestHostDocument.cs (1)
58
ISourceGenerator
? generator = null)
Workspaces\EditorTestWorkspace.cs (1)
72
ISourceGenerator
? generator = null)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
CodeFixes\CodeFixServiceTests.cs (5)
198
var generators = ImmutableArray.Create<
ISourceGenerator
>(generator);
450
public readonly ImmutableArray<
ISourceGenerator
> Generators;
455
public MockAnalyzerReference(ImmutableArray<CodeFixProvider> fixers, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableArray<
ISourceGenerator
> generators)
463
: this(fixers, analyzers, ImmutableArray<
ISourceGenerator
>.Empty)
513
public override ImmutableArray<
ISourceGenerator
> GetGenerators(string language)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Rename\CSharp\SourceGeneratorTests.vb (2)
84
Public Sub Initialize(context As GeneratorInitializationContext) Implements
ISourceGenerator
.Initialize
87
Public Sub Execute(context As GeneratorExecutionContext) Implements
ISourceGenerator
.Execute
Rename\RenameEngineResult.vb (1)
58
Optional sourceGenerator As
ISourceGenerator
= Nothing,
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
72
ISourceGenerator
? generator = null,
88
ISourceGenerator
? generator = null,
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
233
protected static JArray GetGeneratorValues(Compilation compilation, params
ISourceGenerator
[] generators)
Microsoft.CodeAnalysis.Test.Utilities (1)
SourceGeneration\TestGenerators.cs (1)
85
:
ISourceGenerator
Microsoft.CodeAnalysis.UnitTests (2)
Analyzers\AnalyzerFileReferenceTests.cs (2)
486
TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { MetadataReference.CreateFromAssemblyInternal(typeof(
ISourceGenerator
).Assembly) }),
497
var builder = ImmutableArray.CreateBuilder<
ISourceGenerator
>();
Microsoft.CodeAnalysis.VisualBasic (5)
CommandLine\VisualBasicCompiler.vb (2)
262
ByRef generators As ImmutableArray(Of
ISourceGenerator
))
300
Private Protected Overrides Function CreateGeneratorDriver(baseDirectory As String, parseOptions As ParseOptions, generators As ImmutableArray(Of
ISourceGenerator
), analyzerConfigOptionsProvider As AnalyzerConfigOptionsProvider, additionalTexts As ImmutableArray(Of AdditionalText)) As GeneratorDriver
SourceGeneration\VisualBasicGeneratorDriver.vb (3)
22
Friend Sub New(parseOptions As VisualBasicParseOptions, generators As ImmutableArray(Of
ISourceGenerator
), optionsProvider As AnalyzerConfigOptionsProvider, additionalTexts As ImmutableArray(Of AdditionalText), driverOptions As GeneratorDriverOptions)
40
Public Shared Function Create(generators As ImmutableArray(Of
ISourceGenerator
), Optional additionalTexts As ImmutableArray(Of AdditionalText) = Nothing, Optional parseOptions As VisualBasicParseOptions = Nothing, Optional analyzerConfigOptionsProvider As AnalyzerConfigOptionsProvider = Nothing, Optional driverOptions As GeneratorDriverOptions = Nothing) As VisualBasicGeneratorDriver
46
Public Shared Function Create(generators As ImmutableArray(Of
ISourceGenerator
), additionalTexts As ImmutableArray(Of AdditionalText), parseOptions As VisualBasicParseOptions, analyzerConfigOptionsProvider As AnalyzerConfigOptionsProvider) As VisualBasicGeneratorDriver
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
7906
Optional generators As
ISourceGenerator
() = Nothing) As String
10851
TargetFrameworkUtil.GetReferences(Roslyn.Test.Utilities.TargetFramework.Standard, {MetadataReference.CreateFromAssemblyInternal(GetType(
ISourceGenerator
).Assembly)}),
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (100)
SourceGeneration\GeneratorDriverTests.vb (22)
28
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
50
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator),
66
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
94
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
117
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
133
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
149
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
163
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
361
Dim generator As
ISourceGenerator
= New CallbackGenerator(
390
Dim generator As
ISourceGenerator
= New CallbackGenerator(
482
Dim generator As
ISourceGenerator
= New CallbackGenerator(
511
Dim generator As
ISourceGenerator
= New CallbackGenerator(
571
Dim generator As
ISourceGenerator
= New CallbackGenerator(
600
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(New IncrementalGeneratorWrapper(testGenerator)), parseOptions:=parseOptions)
618
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(testGenerator), parseOptions:=parseOptions)
647
Shared Sub VerifyDiagnosticsWithOptions(generator As
ISourceGenerator
, compilation As Compilation, ParamArray expected As DiagnosticDescription())
669
Dim gen As
ISourceGenerator
= New CallbackGenerator(Sub(c)
706
Dim gen As
ISourceGenerator
= New CallbackGenerator(
753
Public Sub Initialize(context As GeneratorInitializationContext) Implements
ISourceGenerator
.Initialize
757
Public Sub Execute(context As GeneratorExecutionContext) Implements
ISourceGenerator
.Execute
807
Public Sub Initialize(context As GeneratorInitializationContext) Implements
ISourceGenerator
.Initialize
811
Public Sub Execute(context As GeneratorExecutionContext) Implements
ISourceGenerator
.Execute
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.vb (31)
84
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
125
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
168
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
196
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
225
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
251
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
282
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
311
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
340
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
369
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
400
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
443
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
484
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
524
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
563
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
602
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
642
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
678
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
715
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
752
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
789
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
826
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
863
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
899
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
946
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
993
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1036
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1085
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1138
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1196
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1250
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.vb (47)
55
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
87
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
113
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
138
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
163
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
192
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
224
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
256
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
288
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
319
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
345
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
371
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
397
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
430
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
458
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
486
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
513
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
543
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
574
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
604
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
634
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
662
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
690
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
718
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
745
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
772
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
799
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
826
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
855
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
884
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
911
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
937
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
966
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
994
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1020
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1047
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1079
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1119
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1160
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1200
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1242
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1288
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1325
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1365
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1406
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1448
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
1500
Dim driver As GeneratorDriver = VisualBasicGeneratorDriver.Create(ImmutableArray.Create(Of
ISourceGenerator
)(generator), parseOptions:=parseOptions, driverOptions:=TestOptions.GeneratorDriverOptions)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
MockVisualBasicCompiler.vb (4)
16
Private ReadOnly _generators As ImmutableArray(Of
ISourceGenerator
)
35
Public Sub New(responseFile As String, workingDirectory As String, args As String(), Optional analyzers As DiagnosticAnalyzer() = Nothing, Optional generators As
ISourceGenerator
() = Nothing, Optional additionalReferences As MetadataReference() = Nothing)
39
Public Sub New(responseFile As String, buildPaths As BuildPaths, args As String(), Optional analyzers As DiagnosticAnalyzer() = Nothing, Optional generators As
ISourceGenerator
() = Nothing, Optional additionalReferences As MetadataReference() = Nothing)
57
ByRef generators As ImmutableArray(Of
ISourceGenerator
))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Workspace\LanguageServices\VisualBasicCompilationFactoryService.vb (1)
65
generators As ImmutableArray(Of
ISourceGenerator
),
Microsoft.CodeAnalysis.Workspaces (28)
SourceGeneratorTelemetry\ISourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
13
void CollectRunResult(GeneratorDriverRunResult driverRunResult, GeneratorDriverTimingInfo driverTimingInfo, Func<
ISourceGenerator
, AnalyzerReference> getAnalyzerReference);
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (5)
21
public GeneratorTelemetryKey(
ISourceGenerator
generator, AnalyzerReference analyzerReference)
40
private readonly ConditionalWeakTable<
ISourceGenerator
, GeneratorTelemetryKey> _generatorTelemetryKeys = new();
45
private GeneratorTelemetryKey GetTelemetryKey(
ISourceGenerator
generator, Func<
ISourceGenerator
, AnalyzerReference> getAnalyzerReference)
51
Func<
ISourceGenerator
, AnalyzerReference> getAnalyzerReference)
Workspace\Host\CompilationFactory\ICompilationFactoryService.cs (1)
18
GeneratorDriver CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory);
Workspace\Host\Metadata\IAnalyzerAssemblyLoaderProvider.cs (1)
26
/// cref="
ISourceGenerator
"/>s in a fresh <see cref="AssemblyLoadContext"/>.
Workspace\IsolatedAnalyzerFileReference.cs (8)
28
/// then ensures that as long as it is alive (or any <see cref="DiagnosticAnalyzer"/> or <see cref="
ISourceGenerator
"/>
39
/// cref="
ISourceGenerator
"/> is alive, that the corresponding <see cref="IsolatedAnalyzerReferenceSet"/> (and its
45
private static readonly ConditionalWeakTable<
ISourceGenerator
, IsolatedAnalyzerReferenceSet> s_generatorToPinnedReferenceSet = [];
69
public override ImmutableArray<
ISourceGenerator
> GetGenerators()
72
public override ImmutableArray<
ISourceGenerator
> GetGenerators(string language)
75
public override ImmutableArray<
ISourceGenerator
> GetGeneratorsForAllLanguages()
81
private ImmutableArray<
ISourceGenerator
> PinGenerators<TArg>(Func<AnalyzerReference, TArg, ImmutableArray<
ISourceGenerator
>> getItems, TArg arg)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
371
ISourceGenerator
generator,
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (7)
29
ImmutableArray<
ISourceGenerator
> SourceGenerators,
30
FrozenDictionary<
ISourceGenerator
, AnalyzerReference> SourceGeneratorToAnalyzerReference);
35
/// cref="
ISourceGenerator
"/>s produced by those references. This should only be created and cached on the OOP side
56
private static ImmutableArray<
ISourceGenerator
> GetSourceGenerators(ProjectState projectState)
65
private static AnalyzerReference GetAnalyzerReference(ProjectState projectState,
ISourceGenerator
sourceGenerator)
88
using var generators = TemporaryArray<
ISourceGenerator
>.Empty;
89
using var _ = PooledDictionary<
ISourceGenerator
, AnalyzerReference>.GetInstance(out var generatorToAnalyzerReference);
Workspace\Solution\SourceGeneratedDocument.cs (1)
11
/// A <see cref="Document"/> that was generated by an <see cref="
ISourceGenerator
" />.
Workspace\Solution\SourceGeneratedDocumentIdentity.cs (1)
35
public static SourceGeneratedDocumentIdentity Generate(ProjectId projectId, string hintName,
ISourceGenerator
generator, string filePath, AnalyzerReference analyzerReference)
Workspace\Solution\SourceGeneratorIdentity.cs (2)
30
public static SourceGeneratorIdentity Create(
ISourceGenerator
generator, AnalyzerReference analyzerReference)
43
foreach (
var
generator in analyzerReference.GetGenerators(language))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
TestGeneratorReference.cs (3)
18
private readonly
ISourceGenerator
_generator;
21
public TestGeneratorReference(
ISourceGenerator
generator, string? analyzerFilePath = null)
49
public override ImmutableArray<
ISourceGenerator
> GetGenerators(string language) => [_generator];
Workspaces\TestHostDocument.cs (2)
79
public
ISourceGenerator
? Generator;
99
ISourceGenerator
? generator = null)
Workspaces\TestWorkspace.cs (1)
58
ISourceGenerator
? generator = null)
Workspaces\TestWorkspace`1.cs (1)
199
ISourceGenerator
? generator = null);
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Host\LanguageServices\TestCSharpCompilationFactoryServiceWithIncrementalGeneratorTracking.cs (1)
58
GeneratorDriver ICompilationFactoryService.CreateGeneratorDriver(ParseOptions parseOptions, ImmutableArray<
ISourceGenerator
> generators, AnalyzerConfigOptionsProvider optionsProvider, ImmutableArray<AdditionalText> additionalTexts, string? generatedFilesBaseDirectory)
SolutionTests\SolutionWithSourceGeneratorTests.cs (3)
85
static
ISourceGenerator
CreateGenerator() => new SingleFileTestGenerator("// StaticContent", hintName: "generated");
108
public TestGeneratorReferenceWithFilePathEquality(
ISourceGenerator
generator, string analyzerFilePath)
524
ISourceGenerator
generator = generatorProducesTree ? new SingleFileTestGenerator("// StaticContent")
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
245
ISourceGenerator
generator,
259
ISourceGenerator
generator,
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
245
ISourceGenerator
generator,
259
ISourceGenerator
generator,
Microsoft.Gen.Logging.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
245
ISourceGenerator
generator,
259
ISourceGenerator
generator,
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
245
ISourceGenerator
generator,
259
ISourceGenerator
generator,
Microsoft.Gen.MetricsReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
245
ISourceGenerator
generator,
259
ISourceGenerator
generator,
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpSourceGeneratorTest`1.cs (1)
13
where TSourceGenerator :
ISourceGenerator
, new()
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
305
ISourceGenerator
generator = new EnumValidationGenerator().AsSourceGenerator();