Exemple #1
0
        private System.IAsyncResult OnBeginCalculate(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            int firstValue  = ((int)(inValues[0]));
            int secondValue = ((int)(inValues[1]));

            CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation operationType = ((CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation)(inValues[2]));
            return(this.BeginCalculate(firstValue, secondValue, operationType, callback, asyncState));
        }
Exemple #2
0
 public void CalculateAsync(int firstValue, int secondValue, CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation operationType, object userState)
 {
     if ((this.onBeginCalculateDelegate == null))
     {
         this.onBeginCalculateDelegate = new BeginOperationDelegate(this.OnBeginCalculate);
     }
     if ((this.onEndCalculateDelegate == null))
     {
         this.onEndCalculateDelegate = new EndOperationDelegate(this.OnEndCalculate);
     }
     if ((this.onCalculateCompletedDelegate == null))
     {
         this.onCalculateCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCalculateCompleted);
     }
     base.InvokeAsync(this.onBeginCalculateDelegate, new object[] {
         firstValue,
         secondValue,
         operationType
     }, this.onEndCalculateDelegate, this.onCalculateCompletedDelegate, userState);
 }
Exemple #3
0
 public void CalculateAsync(int firstValue, int secondValue, CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation operationType)
 {
     this.CalculateAsync(firstValue, secondValue, operationType, null);
 }
Exemple #4
0
 public System.IAsyncResult BeginCalculate(int firstValue, int secondValue, CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation operationType, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginCalculate(firstValue, secondValue, operationType, callback, asyncState));
 }
Exemple #5
0
 public int Calculate(int firstValue, int secondValue, CalculatorAsyncInvoke.ServiceCalculator.CalculationOperation operationType)
 {
     return(base.Channel.Calculate(firstValue, secondValue, operationType));
 }