protected static Restriction CreateIsNdrRestrictions() { return(Condition.CreateAndRestriction(new Restriction[] { Condition.CreateStringContentRestriction(PropTag.MessageClass, "REPORT", ContentFlags.Prefix | ContentFlags.IgnoreCase), Condition.CreateStringContentRestriction(PropTag.MessageClass, ".NDR", ContentFlags.SubString | ContentFlags.IgnoreCase) })); }
protected static Restriction CreateAndStringPropertyRestriction(PropTag propertyTag, string[] values) { Restriction[] array = new Restriction.PropertyRestriction[values.Length]; for (int i = 0; i < values.Length; i++) { array[i] = Condition.CreatePropertyRestriction <string>(propertyTag, values[i]); } return(Condition.CreateAndRestriction(array)); }
internal override Restriction BuildRestriction() { if (string.Equals(this.action, RequestedAction.Any.ToString(), StringComparison.OrdinalIgnoreCase)) { return(Condition.CreatePropertyRestriction <int>((PropTag)277872643U, 2)); } PropTag propertyTag = base.Rule.PropertyDefinitionToPropTagFromCache(Rule.NamedDefinitions[5]); return(Condition.CreateAndRestriction(new Restriction[] { Condition.CreatePropertyRestriction <int>((PropTag)277872643U, 2), Condition.CreatePropertyRestriction <string>(propertyTag, this.action) })); }
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 })); }