Beispiel #1
0
        private static string CreateMessage(UploadFinalizeCommandResult response)
        {
            var error = response?.ProcessingInfo?.Error;

            return(error == null
                ? response?.Json ?? "Upload failed."
                : (error.Message != null
                    ? error.Name + ": " + error.Message
                    : error.Name));
        }
Beispiel #2
0
 private static string CreateMessage(UploadFinalizeCommandResult response)
 {
     var error = response?.ProcessingInfo?.Error;
     return error == null
         ? response?.Json ?? "Upload failed."
         : (error.Message != null
             ? error.Name + ": " + error.Message
             : error.Name);
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaProcessingException"/> class.
 /// </summary>
 /// <param name="response">The response from media/upload.</param>
 public MediaProcessingException(UploadFinalizeCommandResult response)
     : base(CreateMessage(response))
 {
     this.Response = response;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediaProcessingException"/> class.
 /// </summary>
 /// <param name="response">The response from media/upload.</param>
 public MediaProcessingException(UploadFinalizeCommandResult response)
     : base(CreateMessage(response))
 {
     this.Response = response;
 }