1 write to HostOutputs
Microsoft.CodeAnalysis (1)
SourceGeneration\RunResults.cs (1)
99
this.
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)
3113
Assert.DoesNotContain(result.Results[0].
HostOutputs
, o => o.Key == "Host");
3124
Assert.Contains(result.Results[0].
HostOutputs
, o => o.Key == "Host");
4526
var (key, value) = Assert.Single(result.
HostOutputs
);
4546
Assert.Empty(result.
HostOutputs
);
4562
Assert.Equal(2, result.
HostOutputs
.Keys.Count());
4563
Assert.Contains("a", (IDictionary<string, object>)result.
HostOutputs
);
4564
Assert.Equal("value", result.
HostOutputs
["a"]);
4565
Assert.Contains("b", (IDictionary<string, object>)result.
HostOutputs
);
4566
Assert.Equal("value2", result.
HostOutputs
["b"]);
4582
Assert.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); }
4635
Assert.Empty(result.
HostOutputs
);
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
36
public static ImmutableArray<(string Key, string Value)> GetHostOutputs(this GeneratorRunResult runResult) => runResult.
HostOutputs
.ToImmutableArray().SelectAsArray(a => (a.Key, a.Value.ToString() ?? ""));