IAsyncResult IWcfService <TRequest, TResponse> .BeginProcess(TRequest request, AsyncCallback callback, object state)
        {
            var result = new ServiceAsyncResult(state);

            Log.WarnFormat("Doing SendLocal with Callback!");
            return(((UnicastBus)bus).SendLocal(request).Register(r => ProxyCallback(callback, result, r), state));
        }
Example #2
0
        private static void ProxyCallback(AsyncCallback callback, ServiceAsyncResult result, IAsyncResult busResult)
        {
            var completionResult = (CompletionResult)busResult.AsyncState;

            result.Complete(completionResult);

            callback(result);
        }
Example #3
0
        IAsyncResult IWcfService <TRequest, TResponse> .BeginProcess(TRequest request, AsyncCallback callback, object state)
        {
            var result = new ServiceAsyncResult(state);

            return(bus.SendLocal(request).Register(r => ProxyCallback(callback, result, r), state));
        }