Пример #1
0
    private void OnRequestError(UIRequest request, ErrorResponse errorResponse) {
      if (request.OnReceive != null)
        Logger.WrapActionInvocation(request.OnReceive);

      if (request.OnError != null) {
        _synchronizationContextProvider.UIContext.Post(() => {
            if (errorResponse.IsOperationCanceled()) {
              // UIRequest are cancelable at any point.
            } else {
              request.OnError(errorResponse);
            }
        });
      }
    }
        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);
            }
            });
              }
        }
Пример #3
0
 public void SetErrorResponse(ErrorResponse errorResponse)
 {
     var messages = new List<TreeViewItemViewModel>();
       var rootError = new RootErrorItemViewModel(ImageSourceFactory, null, "Error processing request. You may need to restart Visual Studio.");
       messages.Add(rootError);
       while (errorResponse != null) {
     rootError.Children.Add(new TextItemViewModel(ImageSourceFactory, rootError, errorResponse.Message));
     errorResponse = errorResponse.InnerError;
       }
       SetRootNodes(messages);
 }
Пример #4
0
 private void FileSystemTreeSource_OnErrorReceived(ErrorResponse errorResponse) {
   WpfUtilities.Post(this, () => {
     Controller.OnFileSystemTreeError(errorResponse);
   });
 }
 private void OnErrorReceived(ErrorResponse errorResponse) {
   // TODO(rpaquay)
 }
 public ErrorResponseException(ErrorResponse errorResponse)
   : base(errorResponse.Message) {
   _errorResponse = errorResponse;
 }
Пример #7
0
 public ErrorResponseException(ErrorResponse errorResponse)
     : base(errorResponse.Message)
 {
     _errorResponse = errorResponse;
 }
Пример #8
0
 protected virtual void OnErrorReceived(ErrorResponse obj) {
   var handler = ErrorReceived;
   if (handler != null) handler(obj);
 }