public static StaticTypeLeoVisitor <T> CreateForStaticType <T, TStrategy>(AlgorithmKind kind, bool liteMode, bool strictMode)
            where TStrategy : class, ILeoValidationStrategy <T>, new()
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();
            var visitor = new StaticTypeLeoVisitor <T>(handler, kind, liteMode, strictMode);

            visitor.ValidationEntry.SetStrategy <TStrategy>();
            return(visitor);
        }
        public static FutureInstanceVisitor <T> CreateForFutureInstance <T, TStrategy>(AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode, IDictionary <string, object> initialValues = null)
            where TStrategy : class, ILeoValidationStrategy <T>, new()
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();
            var visitor = new FutureInstanceVisitor <T>(handler, kind, repeatable, initialValues, liteMode, strictMode);

            visitor.ValidationEntry.SetStrategy <TStrategy>();
            return(visitor);
        }
        public static InstanceVisitor <T> CreateForInstance <T, TStrategy>(T instance, AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode)
            where TStrategy : class, ILeoValidationStrategy <T>, new()
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();
            var visitor = new InstanceVisitor <T>(handler, instance, kind, repeatable, liteMode, strictMode);

            visitor.ValidationEntry.SetStrategy <TStrategy>();
            return(visitor);
        }
Beispiel #4
0
        public static StaticTypeLeoVisitor <T> CreateForStaticType <T>(AlgorithmKind kind, bool liteMode, bool strictMode)
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();

            return(new StaticTypeLeoVisitor <T>(handler, kind, liteMode, strictMode));
        }
Beispiel #5
0
        public static FutureInstanceVisitor <T> CreateForFutureInstance <T>(AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode, IDictionary <string, object> initialValues = null)
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();

            return(new FutureInstanceVisitor <T>(handler, kind, repeatable, initialValues, liteMode, strictMode));
        }
Beispiel #6
0
        public static InstanceVisitor <T> CreateForInstance <T>(T instance, AlgorithmKind kind, bool repeatable, bool liteMode, bool strictMode)
        {
            var handler = UnsafeLeoHandleSwitcher.Switch <T>(kind)().With <T>();

            return(new InstanceVisitor <T>(handler, instance, kind, repeatable, liteMode, strictMode));
        }