private object[] OnEndInvoke(System.IAsyncResult result) { Shared.InvokeResponse retVal = ((IInvocableService)(this)).EndInvoke(result); return(new object[] { retVal }); }
public void Invoke(string operationName, Action <Shared.InvokeResponse> callback, params object[] args) { IInvocableService service = Container.Resolve <IInvocableService>(); SynchronizationContext currentContext = SynchronizationContext.Current; service.BeginInvoke(Shared.InvokeRequest.Create <T>(operationName, args), (asyncResult) => { Shared.InvokeResponse response = service.EndInvoke(asyncResult); if (callback != null && response.Error == null) { currentContext.Send((obj) => callback(response), null); } else if (response.Error != null) { throw response.Error; } }, null); }
public Shared.InvokeResponse EndInvoke(System.IAsyncResult result) { object[] _args = new object[0]; Shared.InvokeResponse _result = ((Shared.InvokeResponse)(base.EndInvoke("Invoke", _args, result))); return(_result); }