RelationalDiagnostics: Naming inconsistencies #8001
Labels
breaking-change
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I'm working on a
DiagnosticListener
approach in #7939 and noticed some inconsistencies inRelationalDiagnostics.cs
:nameof(ConnectionClosed)
(repeated)should be
nameof(ConnectionError)`. I've submitted PR Fix diagnostic name for RelationalDiagnostics.ConnectionError #8000 to correct this.^ this should have a capital
B
to be consistent with all other events. in the class, e.g.1 is an obvious bug (unless I'm nuts) and causing active harm re-firing the closed event on errors, not just closes. While there's a workaround of using the
exception
arg on the close listener and seeing if it's null, this is both a) not ensure to be reliable, and b) just plain wrong.2 is minor, but a breaking change to listeners all the same. At the same time, I can't find anyone even using this yet (or someone would have noticed these things?) - should we fix it properly now?
See #7939 (comment) for additional concerns I have about the stability of these APIs. Since everyone is (as far as I know) copying these strings because they are internally restricted, there's no scenario fixed by a simple recompile. Issues like this would be better served in the event names were exposed and compilationally reliable.
The text was updated successfully, but these errors were encountered: