1 write to HostOutputs
Microsoft.CodeAnalysis (1)
SourceGeneration\RunResults.cs (1)
99
this.
HostOutputs
= hostOutputs;
19 references to HostOutputs
Microsoft.CodeAnalysis (3)
SourceGeneration\IncrementalContexts.cs (3)
144
/// via <see cref="GeneratorRunResult.
HostOutputs
"/> and it is up to the host to decide how to use them.
157
/// via <see cref="GeneratorRunResult.
HostOutputs
"/> and it is up to the host to decide how to use them.
327
/// 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)
3249
Assert.DoesNotContain(result.Results[0].
HostOutputs
, o => o.Key == "Host");
3260
Assert.Contains(result.Results[0].
HostOutputs
, o => o.Key == "Host");
4701
var (key, value) = Assert.Single(result.
HostOutputs
);
4721
Assert.Empty(result.
HostOutputs
);
4737
Assert.Equal(2, result.
HostOutputs
.Keys.Count());
4738
Assert.Contains("a", (IDictionary<string, object>)result.
HostOutputs
);
4739
Assert.Equal("value", result.
HostOutputs
["a"]);
4740
Assert.Contains("b", (IDictionary<string, object>)result.
HostOutputs
);
4741
Assert.Equal("value2", result.
HostOutputs
["b"]);
4757
Assert.Empty(result.
HostOutputs
);
4774
(r) => { var result = Assert.Single(r.
HostOutputs
); Assert.Equal("gen1", result.Key); Assert.Equal("value1", result.Value); },
4775
(r) => { var result = Assert.Single(r.
HostOutputs
); Assert.Equal("gen2", result.Key); Assert.Equal("value2", result.Value); }
4792
(r) => { var result = Assert.Single(r.
HostOutputs
); Assert.Equal("gen", result.Key); Assert.Equal("value1", result.Value); },
4793
(r) => { var result = Assert.Single(r.
HostOutputs
); Assert.Equal("gen", result.Key); Assert.Equal("value2", result.Value); }
4810
Assert.Empty(result.
HostOutputs
);
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
35
public static ImmutableArray<(string Key, string Value)> GetHostOutputs(this GeneratorRunResult runResult) => runResult.
HostOutputs
.ToImmutableArray().SelectAsArray(a => (a.Key, a.Value.ToString() ?? ""));