Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }