Пример #1
0
 static void Main(string[] args)
 {
     SimpleService.SimpleServiceClient client =
         new SimpleService.SimpleServiceClient();
     for (int i = 1; i <= 100; i++)
     {
         Thread thread = new Thread(client.DoWork);
         thread.Start();
     }
 }
Пример #2
0
        static void Main(string[] args)
        {
            for (int i = 1; i <= 3; i++)
            {
                SimpleService.SimpleServiceClient client = new SimpleService.SimpleServiceClient();

                for (int j = 1; j <= 3; j++)
                {
                    int number = client.IncrementNumber();
                    Console.WriteLine("Session: {0} Call: {1} Number: {2}", i, j, number);
                }
            }

            Console.ReadLine();
        }
Пример #3
0
        static void Main(string[] args)
        {
            SimpleService.SimpleServiceClient client = new SimpleService.SimpleServiceClient();

            int number = client.IncrementNumber();

            Console.WriteLine("Number after 1st call: {0}", number);

            number = client.IncrementNumber();
            Console.WriteLine("Number after 2nd call: {0}", number);

            number = client.IncrementNumber();
            Console.WriteLine("Number after 3rd call: {0}", number);

            Console.ReadLine();
        }