public FileErrorViewModelItem(string fileName, ErrorConvertingType errorConvertingType, string errorDescription)
        {
            if (String.IsNullOrWhiteSpace(fileName))
            {
                throw new ArgumentNullException(nameof(fileName));
            }

            FileName            = fileName;
            ErrorConvertingType = errorConvertingType;
            ErrorDescription    = errorDescription ?? throw new ArgumentNullException(nameof(errorDescription));
        }
 public ErrorComponent(ErrorConvertingType errorConvertingType, string description)
 {
     ErrorConvertingType = errorConvertingType;
     Description         = description;
 }
 public ErrorCommonResponse(ErrorConvertingType errorConvertingType, string description)
 {
     ErrorConvertingType = errorConvertingType;
     Description         = description;
 }
 /// <summary>
 /// Преобразовать тип ошибки в строковое значение
 /// </summary>
 public static string ErrorTypeToString(ErrorConvertingType errorConvertingType)
 {
     ErrorTypeString.TryGetValue(errorConvertingType, out string fileConvertErrorTypeString);
     return(fileConvertErrorTypeString);
 }
示例#5
0
 public string ToString(string format, IFormatProvider formatProvider) => ErrorConvertingType.ToString();
示例#6
0
 public ErrorCommon(ErrorConvertingType errorConvertingType, string errorDescription, Exception exception)
 {
     ErrorConvertingType = errorConvertingType;
     Description         = errorDescription ?? String.Empty;
     Exception           = exception;
 }
示例#7
0
 public ErrorCommon(ErrorConvertingType errorConvertingType, string errorDescription)
     : this(errorConvertingType, errorDescription, null)
 {
 }
示例#8
0
 /// <summary>
 /// Преобразовать внутренний тип ошибок библиотеки из основного типа
 /// </summary>
 public static ErrorApplicationType ToErrorApplicationType(ErrorConvertingType errorConvertingType) =>
 Enum.TryParse(errorConvertingType.ToString(), true, out ErrorApplicationType errorApplicationType) ?
 errorApplicationType :
 throw new FormatException(nameof(ErrorConvertingType));