internal override Restriction BuildRestriction() { PropTag propertyTag = base.Rule.PropertyDefinitionToPropTagFromCache(Rule.NamedDefinitions[0]); return((1 == base.Text.Length) ? Condition.CreatePropertyRestriction <string>(propertyTag, base.Text[0]) : Condition.CreateAndStringPropertyRestriction(propertyTag, base.Text)); }
internal override Restriction BuildRestriction() { PropTag propertyTag = base.Rule.PropertyDefinitionToPropTagFromCache(Rule.NamedDefinitions[1]); if (base.Text == null || base.Text.Length == 0) { return(Condition.CreatePropertyRestriction <bool>(propertyTag, true)); } PropTag propertyTag2 = base.Rule.PropertyDefinitionToPropTagFromCache(Rule.NamedDefinitions[2]); Restriction restriction = (1 == base.Text.Length) ? Condition.CreatePropertyRestriction <string>(propertyTag2, base.Text[0]) : Condition.CreateAndStringPropertyRestriction(propertyTag2, base.Text); return(Condition.CreateAndRestriction(new Restriction[] { Condition.CreatePropertyRestriction <bool>(propertyTag, true), restriction })); }