1 write to HostOutputs
Microsoft.CodeAnalysis (1)
SourceGeneration\RunResults.cs (1)
99this.HostOutputs = hostOutputs;
17 references to HostOutputs
Microsoft.CodeAnalysis (1)
SourceGeneration\IncrementalContexts.cs (1)
231/// here are made available via the <see cref="GeneratorRunResult.HostOutputs"/> collection, and it is up the host to
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
SourceGeneration\GeneratorDriverTests.cs (15)
3113Assert.DoesNotContain(result.Results[0].HostOutputs, o => o.Key == "Host"); 3124Assert.Contains(result.Results[0].HostOutputs, o => o.Key == "Host"); 4526var (key, value) = Assert.Single(result.HostOutputs); 4546Assert.Empty(result.HostOutputs); 4562Assert.Equal(2, result.HostOutputs.Keys.Count()); 4563Assert.Contains("a", (IDictionary<string, object>)result.HostOutputs); 4564Assert.Equal("value", result.HostOutputs["a"]); 4565Assert.Contains("b", (IDictionary<string, object>)result.HostOutputs); 4566Assert.Equal("value2", result.HostOutputs["b"]); 4582Assert.Empty(result.HostOutputs); 4599(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen1", result.Key); Assert.Equal("value1", result.Value); }, 4600(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen2", result.Key); Assert.Equal("value2", result.Value); } 4617(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value1", result.Value); }, 4618(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value2", result.Value); } 4635Assert.Empty(result.HostOutputs);
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
36public static ImmutableArray<(string Key, string Value)> GetHostOutputs(this GeneratorRunResult runResult) => runResult.HostOutputs.ToImmutableArray().SelectAsArray(a => (a.Key, a.Value.ToString() ?? ""));