public static IValitRules <TObject> WithStrategy <TObject>(this IValitRulesStrategyPicker <TObject> that, Func <DefaultValitStrategies, IValitStrategy> picker) where TObject : class { var strat = picker(new DefaultValitStrategies()); return(that.WithStrategy(strat)); }
IValitResult IValitator <TObject> .Validate(TObject @object, IValitStrategy strategy) { var selectedStrategy = strategy ?? new CompleteValitStrategy(); return(_strategyPicker .WithStrategy(selectedStrategy) .For(@object) .Validate()); }