Example #1
0
 public int RunAllCallsInSeparateContext(int executionCount)
 {
     Console.WriteLine("New Context is created for every call");
     int output = 0;
     for (int i = 0; i < executionCount; i++)
     {
         using (var proxy = new CounterProxy.CounterClient(_endpointConfigurationName))
         {
             output = proxy.Add(1);
         }
     }
     return output;
 }
Example #2
0
 public int RunAllCallsInOneContext(int executionCount)
 {
     Console.WriteLine("All calls are made within the same Context");
     int output = 0;
     using (var proxy = new CounterProxy.CounterClient(_endpointConfigurationName))
     {
         for (int i = 0; i < executionCount; i++)
         {
             output = proxy.Add(1);
         }
     }
     return output;
 }