Пример #1
0
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyContainsPredicate.CreateFromInternalCondition <AnyOfRecipientAddressContainsPredicate>(condition, "Message.EnvelopeRecipients"));
 }
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyContainsPredicate.CreateFromInternalCondition <SubjectContainsPredicate>(condition, "Message.Subject"));
 }
Пример #3
0
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyContainsPredicate.CreateFromInternalCondition <ContentCharacterSetContainsWordsPredicate>(condition, "Message.ContentCharacterSets"));
 }
Пример #4
0
        internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
        {
            if (condition.ConditionType != ConditionType.Predicate)
            {
                return(null);
            }
            PredicateCondition predicateCondition = (PredicateCondition)condition;

            if (!(predicateCondition.Property is HeaderProperty))
            {
                return(null);
            }
            HeaderContainsPredicate headerContainsPredicate = (HeaderContainsPredicate)SinglePropertyContainsPredicate.CreateFromInternalCondition <HeaderContainsPredicate>(condition, predicateCondition.Property.Name);

            if (headerContainsPredicate == null)
            {
                return(null);
            }
            try
            {
                headerContainsPredicate.MessageHeader = new HeaderName(predicateCondition.Property.Name);
            }
            catch (ArgumentOutOfRangeException)
            {
                return(null);
            }
            return(headerContainsPredicate);
        }