Example #1
0
        public static void Snippet12()
        {
            // <Snippet12>
            Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/service");

            // Create a ServiceHost for the CalculatorService type and provide the base address.
            using (ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress))
            {
                serviceHost.Open();
                OperationContext operationContext = OperationContext.Current;
                InstanceContext  instanceContext  = operationContext.InstanceContext;
                instanceContext.IncrementManualFlowControlLimit(100);
            }
            // </Snippet12>
        }
 /// <summary>
 /// Increments the manual control flow limit
 /// </summary>
 /// <param name="limit">int. The flow control limit to increment to.</param>
 public void IncrementManualFlowControlLimit(int limit)
 {
     _context.IncrementManualFlowControlLimit(limit);
 }