Expose a StateChanged event to notify so that the client UI can accuretly display the current connection state.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I am trying to display the current status of the `HubConnection` of SignalR in a .NET UI.
The problem is it can transition to different states and in the end I only have access to the underlying actual state.
It would be beneficial to notify about state transitions so that the UI can acuretly reflect the actual connection sate.
### Describe the solution you'd like
Expose a `StateChanged` event that notifies about the underlying connection state changes.
NOTE: This was already done here:
[State Changed Implementation](https://github.com/SignalR/SignalR/blob/f3600c71f83d8312ad61bced0ca547795734d51e/src/Microsoft.AspNet.SignalR.Client/Connection.cs)
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.