Skip to content

CHR0077: Batch method matches an event type it does not observe

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.

Warning

Add [Observes<TEvent>] for the event type, or remove the case.

  • CHR0071: Batch method observes no event types.