public static InstanceVisitor CreateForInstance <TStrategy>(Type type, object instance, AlgorithmKind kind, bool repeatable, bool liteMode, TStrategy strategy, bool strictMode) where TStrategy : class, ILeoValidationStrategy, new() { var handler = SafeLeoHandleSwitcher.Switch(kind)(type); var visitor = new InstanceVisitor(handler, type, instance, kind, repeatable, liteMode, strictMode); visitor.ValidationEntry.SetStrategy(strategy); return(visitor); }
public static InstanceVisitor CreateForInstance(Type type, object instance, AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode) { var handler = SafeLeoHandleSwitcher.Switch(kind)(type); return(new InstanceVisitor(handler, type, instance, kind, repeatable, liteMode, strictMode)); }
public static StaticTypeLeoVisitor CreateForStaticType(Type type, AlgorithmKind kind, bool liteMode, bool strictMode) { var handler = SafeLeoHandleSwitcher.Switch(kind)(type); return(new StaticTypeLeoVisitor(handler, type, kind, liteMode, strictMode)); }
public static FutureInstanceVisitor CreateForFutureInstance(Type type, AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode, IDictionary <string, object> initialValues = null) { var handler = SafeLeoHandleSwitcher.Switch(kind)(type); return(new FutureInstanceVisitor(handler, type, kind, repeatable, initialValues, liteMode, strictMode)); }