NotifyError() публичный Метод

public NotifyError ( ) : void
Результат void
        public static void Run()
        {
            var chatClient = new ChatClient();
            //var subscription = CreateObservableConnection(chatClient);
            //var subscription = CreateObservableConnectionFluenttly(chatClient);
            var subscription = CreateDefferedObservableConnection(chatClient);

            while (true)
            {
                Console.WriteLine("write a message to be sent, E for error, or X to exit");
                var msg = Console.ReadLine();
                if (msg == "X")
                {
                    chatClient.NotifyClosed();
                    break;
                }

                if (msg == "E")
                {
                    chatClient.NotifyError();
                }

                chatClient.NotifyRecieved(msg);
            }
        }
Пример #2
0
        public static void Run()
        {
            var chatClient = new ChatClient();
            //var subscription = CreateObservableConnection(chatClient);
            //var subscription = CreateObservableConnectionFluenttly(chatClient);
            var subscription = CreateDefferedObservableConnection(chatClient);

            while (true)
            {
                Console.WriteLine("write a message to be sent, E for error, or X to exit");
                var msg = Console.ReadLine();
                if (msg == "X")
                {
                    chatClient.NotifyClosed();
                    break;
                }
                if (msg == "E")
                {
                    chatClient.NotifyError();
                }

                chatClient.NotifyRecieved(msg);
            }
        }