public async Task <Message> SendMsg(string msg, IChatRoomGrain chatRoomGrain) { var newMsg = new Message { Id = Guid.NewGuid(), Content = msg, SenderId = State.Id, SenderNickname = State.Nickname }; return(await chatRoomGrain.AddMessage(newMsg)); }
private static void SubscribeToMessageNotifications(IClusterClient client, ChatRoom chatRoom, IChatRoomGrain chatRoomGrain) { var msgHub = new MessageHub(chatRoom); var msgHubObj = client.CreateObjectReference <IMessageHub>(msgHub).Result; chatRoomGrain.Subscribe(msgHubObj); }