Ejemplo n.º 1
0
        public async Task DeleteMessage(Guid postId, HttpClient httpClient)
        {
            await httpClient.DeleteAsync($"Post/{postId}");

            var deletedMessage = PostModels.FirstOrDefault(postModel => postModel.PostId == postId);

            PostModels.Remove(deletedMessage);

            ChangePost?.Invoke();
        }
Ejemplo n.º 2
0
        public async Task SendMessage(Message message, HubConnection hubConnection)
        {
            await hubConnection.SendAsync(SignalRMehod.SendMessage, message);

            ChangePost?.Invoke();
        }