Exemple #1
0
        private static async Task ExecuteMessageManagementLogic(SignalRClient signalRClient, AuthMicroserviceConfiguration authMicroserviceConfiguration)
        {
            await ConnectAsync(authMicroserviceConfiguration, signalRClient);

            var channel = await HubCommands.CreateChannelAsync(signalRClient);

            var message = await HubCommands.AddMessageAsync(signalRClient, channel.Id);

            await HubCommands.SetLastReadMessageAsync(signalRClient, channel.Id, message.Id);

            await HubCommands.UpdateMessageAsync(signalRClient, message.Id);

            await HubCommands.DeleteMessageAsync(signalRClient, channel.Id, message.Id);
        }
        private static async Task ExecuteMessageManagementLogic(SignalRClient signalRClient)
        {
            await ConnectAsync(signalRClient);

            var channel = await HubCommands.CreateChannelAsync(signalRClient);

            var message = await HubCommands.AddMessageAsync(signalRClient, channel.Id);

            await HubCommands.SetLastReadMessageAsync(signalRClient, channel.Id, message.Id);

            await HubCommands.UpdateMessageAsync(signalRClient, message.Id);

            await HubCommands.DeleteMessageAsync(signalRClient, channel.Id, message.Id);

            await signalRClient.DisconnectAsync();
        }