/// <summary> /// Processes the Move response. /// </summary> /// <param name="sdkException">The SDK exception.</param> private void ProcessMoveResponse(SdkException sdkException) { this.MoveCompleted.SafeInvoke(this, new SdkEventArgs(sdkException)); }
/// <summary> /// Processes the IsPublished response. /// </summary> /// <param name="responseStream">The response stream.</param> /// <param name="requestState">The state of the request.</param> /// <param name="sdkException">The SDK exception.</param> private void ProcessIsPublishedResponse(Stream responseStream, RequestState requestState, SdkException sdkException) { if (sdkException == null) { using (var reader = new StreamReader(responseStream)) { var responseString = reader.ReadToEnd(); var link = ResponseParser.ParseLink(responseString); this.IsPublishedCompleted.SafeInvoke(this, new GenericSdkEventArgs <string>(link)); } } else { this.IsPublishedCompleted.SafeInvoke(this, new GenericSdkEventArgs <string>(sdkException)); } }
/// <summary> /// Processes the MakeDirectory response. /// </summary> /// <param name="sdkException">The SDK exception.</param> private void ProcessMakeDirectoryResponse(SdkException sdkException) { this.MakeFolderCompleted.SafeInvoke(this, new SdkEventArgs(sdkException)); }
/// <summary> /// Processes the Un-publish response. /// </summary> /// <param name="responseStream">The response stream.</param> /// <param name="requestState">The state of the request.</param> /// <param name="sdkException">The SDK exception.</param> private void ProcessUnpublishResponse(Stream responseStream, RequestState requestState, SdkException sdkException) { this.UnpublishCompleted.SafeInvoke(this, new SdkEventArgs(sdkException)); }
/// <summary> /// Processes the GetListPage response. /// </summary> /// <param name="responseStream">The response stream.</param> /// <param name="requestState">The state of the request.</param> /// <param name="sdkException">The SDK exception.</param> private void ProcessGetItemInfoResponse(Stream responseStream, RequestState requestState, SdkException sdkException) { if (sdkException == null) { using (var reader = new StreamReader(responseStream)) { var responseString = reader.ReadToEnd(); var item = ResponseParser.ParseItem(requestState.ResponseArgument, responseString); this.GetItemInfoCompleted.SafeInvoke(this, new GenericSdkEventArgs <DiskItemInfo>(item)); } } else { this.GetItemInfoCompleted.SafeInvoke(this, new GenericSdkEventArgs <DiskItemInfo>(sdkException)); } }
/// <summary> /// Initializes a new instance of the <see cref="GenericSdkEventArgs{TData}"/> class. /// </summary> /// <param name="result">The result.</param> /// <param name="exception">The exception.</param> public GenericSdkEventArgs(TData result, SdkException exception) : base(exception) { this.Result = result; }
/// <summary> /// Initializes a new instance of the <see cref="GenericSdkEventArgs{TData}"/> class. /// </summary> /// <param name="exception">The exception object.</param> public GenericSdkEventArgs(SdkException exception) : base(exception) { }
/// <summary> /// Initializes a new instance of the <see cref="SdkEventArgs"/> class. /// </summary> /// <param name="exception">The exception object.</param> public SdkEventArgs(SdkException exception) { this.Error = exception; }