We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Within this example code:
public class UserNotificationGrain : Grain<UserNotificationState>, IUserNotificationGrain { private HubContext<IUserNotificationHub> _hubContext; public override async Task OnActivateAsync() { _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.
IUserNotificationHub
In the case of the example code, the changes would look something like:
public interface IUserNotificationHub { task Broadcast(UserNotification); } public class UserNotificationGrain : Grain<UserNotificationState>, IUserNotificationGrain { private HubContext<IUserNotificationHub> _hubContext; public override async Task OnActivateAsync() { _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:
Not sure this is desired... @claylaut may have some extra thoughts on it...
Sorry, something went wrong.
@galvesribeiro it's nice to have feature.
claylaut
No branches or pull requests
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: