public static void Validate(Bundle bundle) { if (bundle == null) { throw new ArgumentNullException("bundle"); } Validator.ValidateObject(bundle, ValidationContextFactory.Create(bundle, null), true); }
public static void Validate(ResourceEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } Validator.ValidateObject(entry, ValidationContextFactory.Create(entry, null), true); }
public static void Validate(Element element) { if (element == null) { throw new ArgumentNullException("element"); } Validator.ValidateObject(element, ValidationContextFactory.Create(element, null), true); }
public static void Validate(Resource resource) { if (resource == null) { throw new ArgumentNullException("resource"); } Validator.ValidateObject(resource, ValidationContextFactory.Create(resource, null), true); }
public static void Validate(object value, bool recurse = false) { if (value == null) { throw new ArgumentNullException("value"); } // assertSupportedInstanceType(value); Validator.ValidateObject(value, ValidationContextFactory.Create(value, null, recurse), true); }
public static bool TryValidate(Bundle bundle, ICollection <ValidationResult> validationResults = null) { if (bundle == null) { throw new ArgumentNullException("bundle"); } var results = validationResults ?? new List <ValidationResult>(); return(Validator.TryValidateObject(bundle, ValidationContextFactory.Create(bundle, null), results, true)); }
public static bool TryValidate(ResourceEntry entry, ICollection <ValidationResult> validationResults = null) { if (entry == null) { throw new ArgumentNullException("entry"); } var results = validationResults ?? new List <ValidationResult>(); return(Validator.TryValidateObject(entry, ValidationContextFactory.Create(entry, null), results, true)); }
public static bool TryValidate(object value, ICollection <ValidationResult> validationResults = null, bool recurse = false) { if (value == null) { throw new ArgumentNullException("value"); } // assertSupportedInstanceType(value); var results = validationResults ?? new List <ValidationResult>(); return(Validator.TryValidateObject(value, ValidationContextFactory.Create(value, null, recurse), results, true)); }