public IAsyncResult InvokeBegin(object instance, object[] inputs, AsyncCallback callback, object state) { if (OperationCache == null) { return(InnerOperationInvoker.InvokeBegin(instance, inputs, callback, state)); } OperationCacheKey key = new OperationCacheKey(action, inputs); OperationCacheValue value = OperationCache.Lookup(key); // if it's not in the cache, let the async invoke and let the end handle caching if (value == null) { return(new OperationCachingInvokerAsyncResult(instance, action, inputs, innerOperationInvoker, callback, state)); } // otherwise, just pass all the data to the async result and let it complete synchronously return(new OperationCachingInvokerAsyncResult(instance, action, inputs, value.ReturnValue, value.Outputs, callback, state)); }
//- @InvokeBegin -// public IAsyncResult InvokeBegin(Object instance, Object[] inputs, AsyncCallback callback, Object state) { return(InnerOperationInvoker.InvokeBegin(instance, inputs, callback, state)); }