/// <summary>Constructor</summary> /// <param name="obj">Validated object</param> /// <param name="errors">Validation errors</param> public ValidationErrors(T obj, ValidationError[] errors) { Checker.ArgumentIsNull(obj, "obj"); Checker.ArgumentIsNull(errors, "errors"); Checker.Argument(errors.Length > 0, "errors.Length > 0"); Object = obj; Errors = errors; }
/// <summary>Constructor</summary> /// <param name="message">Validation message</param> /// <param name="enumType"><see cref="Enum"/> type</param> public EnumStringValidateAttribute(string message, Type enumType) : base(message) { Checker.ArgumentIsNull(enumType, "enumType"); Checker.Argument(enumType.IsEnum, "enumType.IsEnum"); EnumType = enumType; CanBeNull = false; }