Пример #1
0
        private static int GetSecondaryPriority(Node node, bool forPathPicking)
        {
            MessageTrackingLogEntry messageTrackingLogEntry = (MessageTrackingLogEntry)node.Value;
            bool recipientMatchesRoot = !forPathPicking || string.Equals(node.Key, messageTrackingLogEntry.RootAddress, StringComparison.OrdinalIgnoreCase);

            return(EventTree.GetSecondaryPriority(messageTrackingLogEntry.BccRecipient == null || messageTrackingLogEntry.BccRecipient.Value, messageTrackingLogEntry.HiddenRecipient, recipientMatchesRoot));
        }
Пример #2
0
        protected override int GetNodePriorities(Node node, out int secondaryPriority)
        {
            MessageTrackingLogEntry logEntry = (MessageTrackingLogEntry)node.Value;

            secondaryPriority = EventTree.GetSecondaryPriority(node, true);
            return(EventTree.GetEventPriorityForBestResultLeaf(logEntry, this.deprioritizeHa));
        }
Пример #3
0
        protected override int GetNodePriorities(Node node, out int secondaryPriority)
        {
            RecipientTrackingEvent      recipientTrackingEvent = (RecipientTrackingEvent)node.Value;
            EventDescriptionInformation eventDescriptionInformation;

            if (!EnumAttributeInfo <EventDescription, EventDescriptionInformation> .TryGetValue((int)recipientTrackingEvent.EventDescription, out eventDescriptionInformation))
            {
                throw new InvalidOperationException(string.Format("Value {0} was not annotated", Names <EventDescription> .Map[(int)recipientTrackingEvent.EventDescription]));
            }
            secondaryPriority = EventTree.GetSecondaryPriority(recipientTrackingEvent.BccRecipient, recipientTrackingEvent.HiddenRecipient, string.Equals(recipientTrackingEvent.RootAddress, (string)recipientTrackingEvent.RecipientAddress, StringComparison.OrdinalIgnoreCase));
            return(eventDescriptionInformation.EventPriority);
        }
Пример #4
0
        private Node FindParentMatchingParameters(MessageTrackingLogEntry childEntryValue, long?mailItemId, MessageTrackingEvent[] eventTypes, EventTree.EventMatchingCondition eventMatchingCondition, MessageTrackingSource?source, LinkedList <Node> possibleParents)
        {
            Node node = null;

            foreach (Node node2 in possibleParents)
            {
                MessageTrackingLogEntry messageTrackingLogEntry = (MessageTrackingLogEntry)node2.Value;
                if (messageTrackingLogEntry != childEntryValue && !messageTrackingLogEntry.SharesRowDataWithEntry(childEntryValue) && string.IsNullOrEmpty(messageTrackingLogEntry.FederatedDeliveryAddress))
                {
                    if (mailItemId != null)
                    {
                        long num;
                        if (messageTrackingLogEntry.EventId == MessageTrackingEvent.TRANSFER || messageTrackingLogEntry.EventId == MessageTrackingEvent.RESUBMIT)
                        {
                            num = messageTrackingLogEntry.InternalMessageId;
                        }
                        else
                        {
                            num = messageTrackingLogEntry.ServerLogKeyMailItemId;
                        }
                        if (mailItemId != num)
                        {
                            continue;
                        }
                    }
                    if (eventTypes != null)
                    {
                        bool flag  = eventMatchingCondition == EventTree.EventMatchingCondition.MustMatch;
                        bool flag2 = !flag;
                        foreach (MessageTrackingEvent messageTrackingEvent in eventTypes)
                        {
                            if (messageTrackingEvent == messageTrackingLogEntry.EventId)
                            {
                                flag2 = flag;
                                break;
                            }
                        }
                        if (!flag2)
                        {
                            continue;
                        }
                    }
                    if ((source == null || source.Value == messageTrackingLogEntry.Source) && (node == null || EventTree.GetSecondaryPriority(node, false) >= EventTree.GetSecondaryPriority(node2, false)))
                    {
                        node = node2;
                    }
                }
            }
            return(node);
        }