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)); } }
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(); }
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(); }
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); } }
internal static Exception Create(EXCode code, params object[] data) { return EX.Create(code, null, data); }
internal static Exception Create(EXCode code, object expected, object actual) { return EX.Create(code, null, expected, actual); }
internal static Exception Create(EXCode code, params object[] data) { return(EX.Create(code, null, data)); }
internal static Exception Create(EXCode code, object expected, object actual) { return(EX.Create(code, null, expected, actual)); }