CHR0047: A clear declaration is never applied by projection construction (retired)
Rule Description
Section titled “Rule Description”This rule has been retired and no longer reports anything. It warned that two declarations looked like a clear, compiled, registered, and did nothing:
[SetValue<TEvent>(null)], which projection construction dropped where the set-value mappings were built.[ClearWith<TEvent>]on a property or a parameter, which only the class-level form on a nested type was ever read from.
Both are a working scalar clear now: they write the member back to no value every time the event is observed, replay included. Every reading of the rule became false, so it was removed rather than narrowed.
The identifier stays reserved and will never be reused. Anyone who suppressed CHR0047 did so to accept a clear that did nothing; carrying that suppression silently onto a different rule would hide something they never agreed to.
Severity
Section titled “Severity”None — the rule is no longer reported.
What To Do Instead
Section titled “What To Do Instead”Nothing. If you suppressed CHR0047 — with #pragma warning disable, a NoWarn, or an .editorconfig entry — remove the suppression: the declaration it covered now does what it says.
One shape still has no correct reading, and CHR0048 reports it: clearing a member that cannot hold null. Declare the member as nullable, or set the value you actually want with [SetValue<TEvent>(...)].
Related Rules
Section titled “Related Rules”- CHR0048: A clear is declared for a member that cannot hold null — the rule that took over the shapes that are still wrong.
- CHR0024: Read model property has no mapping source — a null
[SetValue]no longer suppresses it, because a clear is not a mapping source.