We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 470011b commit 9ba52efCopy full SHA for 9ba52ef
1 file changed
CommunityToolkit.Tooling.SampleGen/ToolkitSampleMetadataGenerator.Sample.cs
@@ -163,6 +163,10 @@ void Execute(IncrementalValuesProvider<ISymbol> types, bool skipDiagnostics = fa
163
164
private static void CreateSampleRegistry(SourceProductionContext ctx, Dictionary<string, ToolkitSampleRecord> sampleMetadata)
165
{
166
+ // TODO: Emit a better error that no samples are here?
167
+ if (sampleMetadata.Count == 0)
168
+ return;
169
+
170
var source = BuildRegistrationCallsFromMetadata(sampleMetadata);
171
ctx.AddSource($"ToolkitSampleRegistry.g.cs", source);
172
}
0 commit comments