Skip to content

Commit 3692ba6

Browse files
authored
Merge pull request #9 from ChilliCream/LargeObjects
Fix: Don't run the generation against classes
2 parents 3cb584b + 6809e57 commit 3692ba6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Generator/EventSourceResolver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public IEnumerable<EventSourceFile> FindEventSourceDefinitions()
3333
EventSourceDefinitionVisitor visitor = new EventSourceDefinitionVisitor();
3434
visitor.Visit(document.GetSyntaxRoot());
3535

36-
if (visitor.EventSource.HasEvents)
36+
if (visitor.EventSource.IsInterface
37+
&& visitor.EventSource.HasEvents)
3738
{
3839
yield return new EventSourceFile(document, visitor.EventSource);
3940
}

src/Generator/Templates/EventSourceModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ internal class EventSourceModel
2020

2121
public bool HasEvents => Events.Any();
2222
public bool HasWriteMethods => WriteMethods.Any();
23+
public bool IsInterface => !string.IsNullOrWhiteSpace(InterfaceName);
2324
}
2425
}

0 commit comments

Comments
 (0)