Example #1
0
        private static void Main()
        {
            Console.Title = "ExampleEpsilon.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            const string serviceUrl = @"http://*****:*****@"C:\SoapLog\Epsilon\Client";
            string useCustomHandler = Boolean.FalseString;

            CustomBinding customBinding = new CustomBinding();

            customBinding.Elements.Add(new LoggingBindingElement(logPath, useCustomHandler));
            customBinding.Elements.Add(new HttpTransportBindingElement());

            var serviceClient = new WeatherServiceClient(customBinding, address);

            var randomDataClient = new RandomDataClient(serviceClient);

            randomDataClient.StartThreads();

            Console.ReadLine();
        }
Example #2
0
        private static void Main()
        {
            Console.Title = "ExampleEpsilon.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            const string serviceUrl = "http://*****:*****@"C:\SoapLog\Epsilon\Client";
            const bool     saveOriginalBinaryBody = false;
            const bool     useCustomHandler       = false;
            MessageVersion messageVersion         = MessageVersion.Soap11;

            var customBinding = new CustomBinding();

            customBinding.Elements.Add(new LoggingBindingElement(logPath, saveOriginalBinaryBody, useCustomHandler, messageVersion));
            customBinding.Elements.Add(new HttpTransportBindingElement());

            var serviceClient = new WeatherServiceClient(customBinding, address);

            var randomDataClient = new RandomDataClient(() => serviceClient);

            randomDataClient.StartThreads();

            Task.Delay(500).ContinueWith(_ => Process.Start("explorer.exe", logPath));

            Console.ReadLine();
        }
Example #3
0
        private static void Main()
        {
            Console.Title = "ExampleTau.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            var serviceClient    = new WeatherServiceClient();
            var randomDataClient = new RandomDataClient(serviceClient);

            randomDataClient.StartThreads();

            Console.ReadLine();
        }
Example #4
0
        private static void Main()
        {
            Console.Title = "ExampleGamma.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            // NOTE: if we use custom handling - each new request should use new client class object

            var randomDataClient = new RandomDataClient(() => new WeatherServiceClientCustomHandler());

            randomDataClient.StartThreads();

            Task.Delay(3000).ContinueWith(_ => Process.Start("explorer.exe", @"C:\SoapLog\Gamma"));

            Console.ReadLine();
        }
Example #5
0
        private static void Main()
        {
            Console.Title = "ExampleDelta.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            var serviceClient = new WeatherServiceClient();

            serviceClient.ClientCredentials.UserName.UserName = "******";
            serviceClient.ClientCredentials.UserName.Password = "******";

            var randomDataClient = new RandomDataClient(serviceClient);

            randomDataClient.StartThreads();

            Console.ReadLine();
        }
Example #6
0
        private static void Main()
        {
            Console.Title = "ExampleBeta.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            // if no custom handling - it's ok to reuse client class object

            var serviceClient    = new WeatherServiceClient();
            var randomDataClient = new RandomDataClient(() => serviceClient);

            randomDataClient.StartThreads();

            Task.Delay(500).ContinueWith(_ => Process.Start("explorer.exe", @"C:\SoapLog\Beta"));

            Console.ReadLine();
        }
Example #7
0
        private static void Main()
        {
            Console.Title = "ExampleDelta.Client";
            Console.WriteLine("Press any key to start client.");
            Console.ReadKey();
            Console.WriteLine();

            var serviceClient = new WeatherServiceClient();

            serviceClient.ClientCredentials.UserName.UserName = "******";
            serviceClient.ClientCredentials.UserName.Password = "******";

            var randomDataClient = new RandomDataClient(() => serviceClient);

            randomDataClient.StartThreads();

            Task.Delay(500).ContinueWith(_ => Process.Start("explorer.exe", @"C:\SoapLog\Delta"));

            Console.ReadLine();
        }