Esempio n. 1
0
 internal static string Message(EXCode code, params object[] data)
 {
     switch (code)
     {
     default:
         return(string.Format("{1:X8}: {0} - Expected: {1} - Actual: {2}", EX.messages[code], (int)code, data));
     }
 }
Esempio n. 2
0
File: EX.cs Progetto: eriser/nsynth
        internal static Exception Create(EXCode code, Exception innerException, params object[] data)
        {
            switch (code)
            {
                case EXCode.ArgumentNull:
                    return new ArgumentNullException(data[0] as string, EX.Message(code, data));

                case EXCode.BitmapPixelArraySizeMismatch:
                    return new ArgumentException(EX.Message(code, data), innerException);

                case EXCode.BitmapHeightTooSmall:
                case EXCode.BitmapWidthTooSmall:
                    return new ArgumentOutOfRangeException(EX.Message(code, data), innerException);
            }

            throw new Exception();
        }
Esempio n. 3
0
        internal static Exception Create(EXCode code, Exception innerException, params object[] data)
        {
            switch (code)
            {
            case EXCode.ArgumentNull:
                return(new ArgumentNullException(data[0] as string, EX.Message(code, data)));

            case EXCode.BitmapPixelArraySizeMismatch:
                return(new ArgumentException(EX.Message(code, data), innerException));

            case EXCode.BitmapHeightTooSmall:
            case EXCode.BitmapWidthTooSmall:
                return(new ArgumentOutOfRangeException(EX.Message(code, data), innerException));
            }

            throw new Exception();
        }
Esempio n. 4
0
File: EX.cs Progetto: eriser/nsynth
 internal static string Message(EXCode code, params object[] data)
 {
     switch (code)
     {
          default:
             return string.Format("{1:X8}: {0} - Expected: {1} - Actual: {2}", EX.messages[code], (int)code, data);
     }
 }
Esempio n. 5
0
File: EX.cs Progetto: eriser/nsynth
 internal static Exception Create(EXCode code, params object[] data)
 {
     return EX.Create(code, null, data);
 }
Esempio n. 6
0
File: EX.cs Progetto: eriser/nsynth
 internal static Exception Create(EXCode code, object expected, object actual)
 {
     return EX.Create(code, null, expected, actual);
 }
Esempio n. 7
0
 internal static Exception Create(EXCode code, params object[] data)
 {
     return(EX.Create(code, null, data));
 }
Esempio n. 8
0
 internal static Exception Create(EXCode code, object expected, object actual)
 {
     return(EX.Create(code, null, expected, actual));
 }