17 references to AddSource
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Emitter.cs (2)
123_context.AddSource("HubClientProxy.g.cs", SourceText.From(extensions.ToString(), Encoding.UTF8)); 192_context.AddSource($"HubClientProxy.{typeSpec.TypeName}.g.cs", SourceText.From(registrationMethodBody.ToString(), Encoding.UTF8));
HubServerProxyGenerator.Emitter.cs (2)
75_context.AddSource("HubServerProxy.g.cs", SourceText.From(getProxy.ToString(), Encoding.UTF8)); 163_context.AddSource($"HubServerProxy.{classSpec.ClassTypeName}.g.cs", SourceText.From(proxy.ToString(), Encoding.UTF8));
Microsoft.CodeAnalysis (1)
SourceGeneration\IncrementalContexts.cs (1)
158public void AddSource(string hintName, string source) => AddSource(hintName, SourceText.From(source, Encoding.UTF8));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
SourceGeneration\GeneratorDriverTests.cs (4)
491spc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8)); 494Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8))); 497Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test.cs", SourceText.From("public class D{}", Encoding.UTF8))); 504spc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8));
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
102context.AddSource("hint", SourceText.From(s));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
GenerateFileForEachAdditionalFileWithContentsCommented.cs (1)
21context.AddSource(
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Roslyn4.0.cs (1)
57context.AddSource("LoggerMessage.g.cs", SourceText.From(result, Encoding.UTF8));
Microsoft.Extensions.Options.SourceGeneration (1)
Generator.cs (1)
56context.AddSource("Validators.g.cs", SourceText.From(result, Encoding.UTF8));
Microsoft.Gen.Logging (1)
LoggingGenerator.cs (1)
49context.AddSource("Logging.g.cs", SourceText.From(result, Encoding.UTF8));
Microsoft.Gen.Metrics (2)
MetricsGenerator.cs (2)
40context.AddSource("Factory.g.cs", SourceText.From(factory, Encoding.UTF8)); 44context.AddSource("Metrics.g.cs", SourceText.From(metrics, Encoding.UTF8));
System.Private.CoreLib.Generators (1)
EventSourceGenerator.Emitter.cs (1)
27context.AddSource($"{ec.ClassName}.g.cs", SourceText.From(sb.ToString(), Encoding.UTF8));