We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe4333b commit 6809e57Copy full SHA for 6809e57
src/Generator/EventSourceResolver.cs
@@ -33,7 +33,8 @@ public IEnumerable<EventSourceFile> FindEventSourceDefinitions()
33
EventSourceDefinitionVisitor visitor = new EventSourceDefinitionVisitor();
34
visitor.Visit(document.GetSyntaxRoot());
35
36
- if (visitor.EventSource.HasEvents)
+ if (visitor.EventSource.IsInterface
37
+ && visitor.EventSource.HasEvents)
38
{
39
yield return new EventSourceFile(document, visitor.EventSource);
40
}
src/Generator/Templates/EventSourceModel.cs
@@ -20,5 +20,6 @@ internal class EventSourceModel
20
21
public bool HasEvents => Events.Any();
22
public bool HasWriteMethods => WriteMethods.Any();
23
+ public bool IsInterface => !string.IsNullOrWhiteSpace(InterfaceName);
24
25
0 commit comments