internal static string ToSerializedValue(this MediaJobErrorCode value)
        {
            switch (value)
            {
            case MediaJobErrorCode.ServiceError:
                return("ServiceError");

            case MediaJobErrorCode.ServiceTransientError:
                return("ServiceTransientError");

            case MediaJobErrorCode.DownloadNotAccessible:
                return("DownloadNotAccessible");

            case MediaJobErrorCode.DownloadTransientError:
                return("DownloadTransientError");

            case MediaJobErrorCode.UploadNotAccessible:
                return("UploadNotAccessible");

            case MediaJobErrorCode.UploadTransientError:
                return("UploadTransientError");

            case MediaJobErrorCode.ConfigurationUnsupported:
                return("ConfigurationUnsupported");

            case MediaJobErrorCode.ContentMalformed:
                return("ContentMalformed");

            case MediaJobErrorCode.ContentUnsupported:
                return("ContentUnsupported");
            }
            return(null);
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the MediaJobError class.
 /// </summary>
 /// <param name="code">Error code describing the error. Possible values
 /// include: 'ServiceError', 'ServiceTransientError',
 /// 'DownloadNotAccessible', 'DownloadTransientError',
 /// 'UploadNotAccessible', 'UploadTransientError',
 /// 'ConfigurationUnsupported', 'ContentMalformed',
 /// 'ContentUnsupported'</param>
 /// <param name="message">A human-readable language-dependent
 /// representation of the error.</param>
 /// <param name="category">Helps with categorization of errors.
 /// Possible values include: 'Service', 'Download', 'Upload',
 /// 'Configuration', 'Content'</param>
 /// <param name="retry">Indicates that it may be possible to retry the
 /// Job. If retry is unsuccessful, please contact Azure support via
 /// Azure Portal. Possible values include: 'DoNotRetry',
 /// 'MayRetry'</param>
 /// <param name="details">An array of details about specific errors
 /// that led to this reported error.</param>
 public MediaJobError(MediaJobErrorCode code = default(MediaJobErrorCode), string message = default(string), MediaJobErrorCategory category = default(MediaJobErrorCategory), MediaJobRetry retry = default(MediaJobRetry), IList <MediaJobErrorDetail> details = default(IList <MediaJobErrorDetail>))
 {
     Code     = code;
     Message  = message;
     Category = category;
     Retry    = retry;
     Details  = details;
     CustomInit();
 }
Пример #3
0
 public static string ToSerialString(this MediaJobErrorCode value) => value switch
 {