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
publicclassUserNotificationGrain:Grain<UserNotificationState>,IUserNotificationGrain{privateHubContext<IUserNotificationHub>_hubContext;publicoverrideasyncTaskOnActivateAsync(){_hubContext=GrainFactory.GetHub<IUserNotificationHub>();// some code...await_hubContext.User(this.GetPrimaryKeyString()).SendSignalRMessage("Broadcast",State.UserNotification);}}
It would be decent if the IUserNotificationHub interface could have methods that are implemented on the client to be exposed to the Grain code.
In the case of the example code, the changes would look something like:
publicinterfaceIUserNotificationHub{taskBroadcast(UserNotification);}publicclassUserNotificationGrain:Grain<UserNotificationState>,IUserNotificationGrain{privateHubContext<IUserNotificationHub>_hubContext;publicoverrideasyncTaskOnActivateAsync(){_hubContext=GrainFactory.GetHub<IUserNotificationHub>();// some code...await_hubContext.User(this.GetPrimaryKeyString()).Broadcast(State.UserNotification);}}
Which would cleanup the server code.
The text was updated successfully, but these errors were encountered:
Within this example code:
It would be decent if the
IUserNotificationHub
interface could have methods that are implemented on the client to be exposed to the Grain code.In the case of the example code, the changes would look something like:
Which would cleanup the server code.
The text was updated successfully, but these errors were encountered: