59 references to AddSource
Microsoft.AspNetCore.App.SourceGenerators (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (39)
SourceGeneration\GeneratorDriverTests.cs (25)
1504ctx.RegisterSourceOutput(name, (spc, n) => spc.AddSource(n, "// generated"));
1591ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => spc.AddSource("test", ""));
1625ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => spc.AddSource("test", ""));
2171spc.AddSource("InvokedMethods.g.cs", string.Join(Environment.NewLine,
2233spc.AddSource(invokedMethod, "// " + invokedMethod);
2331spc.AddSource(invokedMethod, "// " + invokedMethod);
2599ctx.RegisterSourceOutput(step2, (spc, c) => spc.AddSource("a", ""));
3216ctx.RegisterSourceOutput(ctx.CompilationProvider, (context, ct) => context.AddSource("Source", ""));
3217ctx.RegisterImplementationSourceOutput(ctx.CompilationProvider, (context, ct) => context.AddSource("Implementation", ""));
3442context.AddSource(Path.GetFileName(text.Path), "");
3483context.AddSource("generated", "");
3521context.AddSource("generated", "");
3549context.AddSource("generated", "");
3580context.AddSource("generated", "");
3589context.AddSource("generated", "");
3629context.AddSource("generated", "");
4191spc.AddSource(
4370context.AddSource("MyInterceptors.cs", builder.ToString());
4436var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4437var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4481var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator1"); }); }).AsSourceGenerator();
4482var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator2"); }); }).AsSourceGenerator();
4505var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4506var generator2 = new PipelineCallbackGenerator2((ctx) => { initWasCalled = true; ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4566context.AddSource("generated", "");
SourceGeneration\SyntaxAwareGeneratorTests.cs (13)
860spc.AddSource(fieldName, "");
900spc.AddSource(fieldName, "");
906spc.AddSource(className, "");
951spc.AddSource(fieldName, "");
1019spc.AddSource(fieldName, "");
1094spc.AddSource(fieldName, "");
1226spc.AddSource(fieldName, "");
1309spc.AddSource(fieldName, "");
1398spc.AddSource(fieldName, "");
1945ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, s) => spc.AddSource("test", ""));
1992ctx.RegisterSourceOutput(step1, (spc, c) => spc.AddSource("step1", ""));
2018ctx.RegisterSourceOutput(step1, (spc, c) => spc.AddSource("step1", ""));
2021ctx.RegisterSourceOutput(step2, (spc, c) => spc.AddSource("step2", ""));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.Maui.Controls.BindingSourceGen (1)
System.Private.CoreLib.Generators (1)
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.PrivateSourceGenerators (1)