コード例 #1
0
        internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
        {
            PredicateCondition predicateCondition = condition as PredicateCondition;

            if (predicateCondition == null || predicateCondition.ConditionType != ConditionType.Predicate || !(predicateCondition.Property is HeaderProperty))
            {
                return(null);
            }
            HeaderMatchesPredicate headerMatchesPredicate = (HeaderMatchesPredicate)SinglePropertyMatchesPredicate.CreateFromInternalCondition <HeaderMatchesPredicate>(condition, predicateCondition.Property.Name);

            if (headerMatchesPredicate == null)
            {
                return(null);
            }
            try
            {
                headerMatchesPredicate.MessageHeader = new HeaderName(predicateCondition.Property.Name);
            }
            catch (ArgumentOutOfRangeException)
            {
                return(null);
            }
            return(headerMatchesPredicate);
        }
コード例 #2
0
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyMatchesPredicate.CreateFromInternalCondition <FromAddressMatchesPredicate>(condition, "Message.From"));
 }
コード例 #3
0
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyMatchesPredicate.CreateFromInternalCondition <AnyOfRecipientAddressMatchesPredicate>(condition, "Message.EnvelopeRecipients"));
 }
コード例 #4
0
 internal static TransportRulePredicate CreateFromInternalCondition(Condition condition)
 {
     return(SinglePropertyMatchesPredicate.CreateFromInternalCondition <AttachmentNameMatchesPredicate>(condition, "Message.AttachmentNames"));
 }