Exemplo n.º 1
0
        void ISender.ServerNotification(ClientConnection connection, string notificationText)
        {
            logger.Write("ServerNotification");
            var transportContainer = new ServerNotificationContainer(notificationText);

            var transportContainerJsonString = JsonConvert.SerializeObject(transportContainer);
            var byteString = Encoding.UTF8.GetBytes(transportContainerJsonString);

            connection.Stream.Write(byteString, 0, byteString.Length);

            logger.Write(transportContainerJsonString);
        }
Exemplo n.º 2
0
 void IChatCore.ServerNotificationHandle(ServerNotificationContainer serverNotification)
 {
     displayMessageService.Write($"Server Notification: {serverNotification.Text}");
 }