CHR0057: An artifact must target one read model
Rule description
Section titled “Rule description”A .NET class must implement only one closed IProjectionFor<TReadModel> or only one closed IReducerFor<TReadModel> of each kind. Artifact identifiers belong to the class, not to each interface implementation, so one class cannot represent two projections or two reducers.
The rule also checks inherited interfaces. Two inheritance paths to the same closed interface count as one implementation.
Severity
Section titled “Severity”Warning
How to fix
Section titled “How to fix”Split the class into separate projection or reducer classes, one per read model. Each class then has its own artifact identifier.
Default artifact discovery throws TypeImplementsMultipleProjectionInterfaces or TypeMustImplementOnlyOneReducer for an invalid class. Both name the class instead of silently skipping it, and the projection exception also lists its read models.