예제 #1
0
        private Validation GetValidation(Validation.Types type, string arguments, string sql, string description, ValidateLevel level)
        {
            switch (type)
            {
            case Validation.Types.Equal:
            {
                return(new EqualValidation {
                        Arguments = arguments, Sql = sql, Description = description, Level = level
                    });
            }

            case Validation.Types.Range:
            {
                return(new RangeValidation {
                        Arguments = arguments, Sql = sql, Description = description, Level = level
                    });
            }
            }

            throw new SpiderExceptoin($"Unsported validation type: {type}");
        }
예제 #2
0
 internal void RegisterValidation(Validation.Types type, string alert)
 {
     _validationType  = type;
     _validationAlert = alert;
     this.RegisterValidation();
 }
예제 #3
0
 internal void RegisterValidation(Validation.Types type)
 {
     _validationType = type;
     this.RegisterValidation();
 }