private void OnRequestError(UIRequest request, ErrorResponse errorResponse) { if (request.ErrorCallback != null || request.OnAfterRun != null) { _synchronizationContextProvider.UIContext.Post(() => { if (request.OnAfterRun != null) request.OnAfterRun(); if (request.ErrorCallback != null) if (errorResponse.IsOperationCanceled()) { // UIRequest are cancelable at any point. } else { request.ErrorCallback(errorResponse); } }); } }
private void OnRequestSuccess(UIRequest request, TypedResponse response) { if (request.SuccessCallback != null || request.OnAfterRun != null) { _synchronizationContextProvider.UIContext.Post(() => { if (request.OnAfterRun != null) { request.OnAfterRun(); } if (request.SuccessCallback != null) { request.SuccessCallback(response); } }); } }
private void OnRequestError(UIRequest request, ErrorResponse errorResponse) { if (request.ErrorCallback != null || request.OnAfterRun != null) { _synchronizationContextProvider.UIContext.Post(() => { if (request.OnAfterRun != null) { request.OnAfterRun(); } if (request.ErrorCallback != null) { if (errorResponse.IsOperationCanceled()) // UIRequest are cancelable at any point. { } else { request.ErrorCallback(errorResponse); } } }); } }
private void OnRequestSuccess(UIRequest request, TypedResponse response) { if (request.SuccessCallback != null || request.OnAfterRun != null) { _synchronizationContextProvider.UIContext.Post(() => { if (request.OnAfterRun != null) request.OnAfterRun(); if (request.SuccessCallback != null) request.SuccessCallback(response); }); } }