예제 #1
0
        static void Main()
        {
            using (var client = new Learning_WCF.ServiceClient())
            {
                Console.WriteLine("== {0} ==", ClientName);

                var msg = new Learning_WCF.Message
                {
                    MessageMember = "Lets play!!"
                };

                Console.WriteLine("Sending msg: {0}", msg.MessageMember);

                var responce = client.Send(msg);

                foreach (var item in responce)
                {
                    Console.WriteLine(item.MessageMember);
                }
              
                Console.WriteLine("Press any key...");

                Console.ReadKey();
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            using (var client = new Learning_WCF.ServiceClient())
            {
                client.Send(null);

                Console.WriteLine("Ok");
                Console.ReadKey();
            }
        }
예제 #3
0
        static void Main()
        {
            using (var client = new Learning_WCF.ServiceClient())
            using (var reader = new StreamReader(client.Send(@"D:\OneDrive\Video\В.Г. Жданов - Верни себе зрение\disk1.avi")))
            {
                while(!reader.EndOfStream)
                    Console.WriteLine(reader.ReadLine());
            }

            Console.ReadKey();
        }
예제 #4
0
        static void Main()
        {
            using (var client = new Learning_WCF.ServiceClient())
            {
                Console.WriteLine("== {0} ==", ClientName);

                var msg = new Learning_WCF.Message
                {
                    MessageMember = "Lets play!!"
                };

                Console.WriteLine("Sending msg: {0}", msg.MessageMember);

                client.Send(msg);

                var helloMsg = new Learning_WCF.HelloMessage()
                {
                    Sender = "Ivan",
                    MessageMember = "Hello!!"
                };

                Console.WriteLine("Sending hello msg: {0}", helloMsg.MessageMember);

                client.Send(helloMsg);

                var byMsg = new Learning_WCF.ByMessage()
                {
                    Sender = "Ivan",
                    MessageMember = "By!!"
                };

                Console.WriteLine("Sending by msg: {0}", byMsg.MessageMember);

                client.Send(byMsg);

                Console.WriteLine("Press any key...");

                Console.ReadKey();
            }
        }
예제 #5
0
        static void Main()
        {
            using (var client = new Learning_WCF.ServiceClient())
            {
                Console.WriteLine("== {0} ==", ClientName);

                var msg = new Learning_WCF.Message("To Ivan", "Hello !!!");
                
                Console.WriteLine("Sending msg: {0}", msg.Header);

                client.Send(msg);

                Console.WriteLine("Press any key...");

                Console.ReadKey();
            }
        }