コード例 #1
0
ファイル: Program.cs プロジェクト: romeM/WcfSoapLogger
        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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: capslocky/WcfSoapLogger
        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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: romeM/WcfSoapLogger
        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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: jpommers/WcfSoapLogger
        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();
        }
コード例 #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();
        }