コード例 #1
0
        internal static Rule Rule057_email()
        {
            Rule r = new Rule("Email addresses ([email protected]) should end with email address.", 3, "System.Data.DataColumn");

            r.Antecedent.RuleExpressionGroups.Add(TestData_RuleExpressionGroups.LogicalNameEndsWithEmailVariants());

            RuleExpressionGroup gCon = new RuleExpressionGroup(RuleExpressionGroup.LogicOperatorEnum.And);

            gCon.RuleExpressions.Add(new RuleExpression(DataStructureProperty.DatatypeLength, ComparisonConditionEnum.GreaterThan, 50));
            gCon.RuleExpressions.Add(new RuleExpression(DataStructureProperty.LogicalName, ComparisonConditionEnum.EndsWith, "Address"));
            r.Consequent.RuleExpressionGroups.Add(gCon);

            return(r);
        }