CHR0077: Batch method matches an event type it does not observe
Rule description
Section titled “Rule description”A batch method receives only the events of the types its [Observes<TEvent>] attributes name. A switch case, an is check or another type pattern on any other event type can never match, which usually means an [Observes<TEvent>] is missing. CHR0077 reports declaration, type and recursive patterns and is checks on an event type that no [Observes<TEvent>] of the method covers. A pattern on an event type that implements or derives from an observed type is covered.
Severity
Section titled “Severity”Warning
How to fix
Section titled “How to fix”Add [Observes<TEvent>] for the event type, or remove the case.
Related rules
Section titled “Related rules”- CHR0071: Batch method observes no event types.