1 write to GeneratedSources
Microsoft.CodeAnalysis (1)
SourceGeneration\RunResults.cs (1)
94this.GeneratedSources = generatedSources;
62 references to GeneratedSources
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
197return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 228return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
197return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 228return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.AspNetCore.Http.Extensions.Tests (7)
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (3)
34Assert.Empty(result.GeneratedSources); 86Assert.Empty(result.GeneratedSources); 104Assert.Empty(result.GeneratedSources);
RequestDelegateGenerator\CompileTimeCreationTests.cs (4)
203Assert.Empty(result.GeneratedSources); 248Assert.Empty(result.GeneratedSources); 302Assert.Empty(result.GeneratedSources); 755Assert.Empty(result.GeneratedSources);
Microsoft.CodeAnalysis (4)
SourceGeneration\RunResults.cs (4)
61/// This is equivalent to the union of all <see cref="GeneratedSourceResult.SyntaxTree"/>s in each <see cref="GeneratorRunResult.GeneratedSources"/> in each <see cref="Results"/> 69ImmutableInterlocked.InterlockedInitialize(ref _lazyGeneratedTrees, Results.Where(r => !r.GeneratedSources.IsDefaultOrEmpty).SelectMany(r => r.GeneratedSources.Select(g => g.SyntaxTree)).ToImmutableArray()); 134/// When this property has a value, <see cref="GeneratedSources"/> property is guaranteed to be empty, and the <see cref="Diagnostics"/>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
SourceGeneration\GeneratorDriverTests.cs (26)
568Assert.True(result.GeneratedSources.IsDefault); 601Assert.Single(result.GeneratedSources); 602Assert.Equal(results.GeneratedTrees.Single(), result.GeneratedSources.Single().SyntaxTree); 635Assert.Equal(2, result1.GeneratedSources.Length); 636Assert.Equal(results.GeneratedTrees[0], result1.GeneratedSources[0].SyntaxTree); 637Assert.Equal(results.GeneratedTrees[1], result1.GeneratedSources[1].SyntaxTree); 641Assert.Single(result2.GeneratedSources); 642Assert.Equal(results.GeneratedTrees[2], result2.GeneratedSources[0].SyntaxTree); 646Assert.Single(result3.GeneratedSources); 647Assert.Equal(results.GeneratedTrees[3], result3.GeneratedSources[0].SyntaxTree); 687Assert.Empty(result1.GeneratedSources); 693Assert.Empty(result2.GeneratedSources); 1076Assert.Equal(2, result.GeneratedSources.Length); 1109Assert.Equal(2, result1.GeneratedSources.Length); 1110Assert.Equal(results.GeneratedTrees[0], result1.GeneratedSources[0].SyntaxTree); 1111Assert.Equal(results.GeneratedTrees[1], result1.GeneratedSources[1].SyntaxTree); 1115Assert.Single(result2.GeneratedSources); 1116Assert.Equal(results.GeneratedTrees[2], result2.GeneratedSources[0].SyntaxTree); 1120Assert.Single(result3.GeneratedSources); 1121Assert.Equal(results.GeneratedTrees[3], result3.GeneratedSources[0].SyntaxTree); 1512Assert.Equal("// generated", runResults.Results.Single().GeneratedSources.Single().SourceText.ToString()); 3117Assert.DoesNotContain(result.Results[0].GeneratedSources, isTextForKind); 3128Assert.Contains(result.Results[0].GeneratedSources, isTextForKind); 3553Assert.Empty(result.GeneratedSources); 4392Assert.Equal(1, result.Results[0].GeneratedSources.Length); 4397Assert.True(result.Results[1].GeneratedSources.IsDefault);
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
1294Assert.Equal(expectedGeneratedSources, driver.GetRunResult().Results.Single().GeneratedSources.Select(s => (s.HintName, s.SourceText.ToString())));
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
1959Assert.Single(results.Results[1].GeneratedSources);
Microsoft.CodeAnalysis.Workspaces (4)
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
60_producedFilesByGenerator.AddDataPoint(GetTelemetryKey(generatorResult.Generator, getAnalyzerReference), generatorResult.GeneratedSources.Length);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
285runResult.Results.Sum(r => r.GeneratedSources.IsDefaultOrEmpty ? 0 : r.GeneratedSources.Length); 299foreach (var generatedSource in generatorResult.GeneratedSources)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
238return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources); 282return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 328return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
238return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources); 282return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 328return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.Gen.Logging.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
238return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources); 282return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 328return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.Gen.Metrics.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
238return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources); 282return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 328return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);
Microsoft.Gen.MetricsReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
238return (r.Results[0].Diagnostics, r.Results[0].GeneratedSources); 282return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources); 328return (Sort(r.Results[0].Diagnostics), r.Results[0].GeneratedSources);