You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IHubClients and IHubCallerClients now hide interface members IClientProxy Client(string connectionId); and IClientProxy Caller { get; } with ISingleClientProxy Client(string connectionId); and ISingleClientProxy Caller { get; } in order to add support for client results.
This is not a breaking change to production code, unless you use reflection to call the above Client or Caller methods.
Version
.NET 7
Previous behavior
When using a testing library like Moq to unit test a SignalR Hub, you may write some code like follows:
Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Behavioral change: Existing code and binaries may experience different run-time behavior.
Reason for change
The change was made to add new functionality to SignalR and is non-breaking in normal use cases. The main area we see the change breaking is in test code which is easily updated.
Recommended action
Update test code to use the ISingleClientProxy interface when using reflection/reflection-based test code.
Description
IHubClients
andIHubCallerClients
now hide interface membersIClientProxy Client(string connectionId);
andIClientProxy Caller { get; }
withISingleClientProxy Client(string connectionId);
andISingleClientProxy Caller { get; }
in order to add support for client results.This is not a breaking change to production code, unless you use reflection to call the above
Client
orCaller
methods.Version
.NET 7
Previous behavior
When using a testing library like Moq to unit test a SignalR Hub, you may write some code like follows:
New behavior
Type of breaking change
Reason for change
The change was made to add new functionality to SignalR and is non-breaking in normal use cases. The main area we see the change breaking is in test code which is easily updated.
Recommended action
Update test code to use the
ISingleClientProxy
interface when using reflection/reflection-based test code.Affected APIs
IHubClients
andIHubCallerClients
The text was updated successfully, but these errors were encountered: