Ejemplo n.º 1
0
        /// <summary>
        ///     Sets the behavior for the null reference passed to be validated.
        /// </summary>
        /// <param name="options"></param>
        /// <param name="nullRootStrategy">Behavior for the null reference passed to be validated.</param>
        public static IValidationContextOptions SetNullRootStrategy(this IValidationContextOptions options, NullRootStrategy nullRootStrategy)
        {
            options.ValidationOptions.SetNullRootStrategy(nullRootStrategy);

            return(options);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Sets the behavior for the null reference passed to be validated.
 /// </summary>
 /// <param name="options"></param>
 /// <param name="nullRootStrategy">Behavior for the null reference passed to be validated.</param>
 public static IValidationOptions SetNullRootStrategy(this IValidationOptions options, NullRootStrategy nullRootStrategy)
 {
     return(OptionsUnwrapper.UnwrapValidationOptions(options, validationOptions => { validationOptions.NullRootStrategy = nullRootStrategy; }));
 }