internal static LogCondition GetRecipientCondition(ProxyAddressCollection[] addresses) { LogOrCondition logOrCondition = new LogOrCondition(); int num = 0; int num2 = 0; foreach (ProxyAddressCollection proxyAddressCollection in addresses) { foreach (ProxyAddress proxyAddress in proxyAddressCollection) { if (proxyAddress.Prefix == ProxyAddressPrefix.Smtp) { logOrCondition.Conditions.Add(TrackingSearch.GetSingleRecipientCondition(proxyAddress.AddressString, string.Concat(new object[] { "r", num, ",", num2 }))); num2++; } } num++; } return(logOrCondition); }
internal static LogSearchCursor GetCursor(string server, ServerVersion version, string logFile, string messageId, ProxyAddressCollection senderProxyAddresses, DateTime startTime, DateTime endTime) { LogQuery logQuery = new LogQuery(); LogAndCondition logAndCondition = new LogAndCondition(); if (!string.IsNullOrEmpty(messageId)) { LogCondition fieldStringComparison = TrackingSearch.GetFieldStringComparison(MessageTrackingField.MessageId, CsvFieldCache.NormalizeMessageID(messageId)); logAndCondition.Conditions.Add(fieldStringComparison); } if (senderProxyAddresses != null) { LogOrCondition logOrCondition = new LogOrCondition(); foreach (ProxyAddress proxyAddress in senderProxyAddresses) { LogCondition fieldStringComparison2 = TrackingSearch.GetFieldStringComparison(MessageTrackingField.SenderAddress, proxyAddress.AddressString); logOrCondition.Conditions.Add(fieldStringComparison2); } logAndCondition.Conditions.Add(logOrCondition); } logQuery.Filter = logAndCondition; logQuery.Beginning = startTime; logQuery.End = endTime; return(new LogSearchCursor(MessageTrackingSchema.MessageTrackingEvent, server, version, logFile, logQuery, null)); }
// Token: 0x0600002B RID: 43 RVA: 0x0000345C File Offset: 0x0000165C private static bool CheckFieldEqualsConstantCondition(LogCondition condition, List <IndexedSearch> searches, CsvField[] indexedFields) { LogOrCondition logOrCondition = condition as LogOrCondition; IndexedSearch indexedSearch; if (logOrCondition != null) { List <IndexedSearch> list = new List <IndexedSearch>(); foreach (LogCondition condition2 in logOrCondition.Conditions) { indexedSearch = LogEvaluator.CheckSimpleFieldEqualsConstantCondition(condition2, indexedFields); if (indexedSearch == null) { return(false); } list.Add(indexedSearch); } searches.AddRange(list); return(true); } indexedSearch = LogEvaluator.CheckSimpleFieldEqualsConstantCondition(condition, indexedFields); if (indexedSearch != null) { searches.Add(indexedSearch); return(true); } return(false); }
private LogCondition GetRecipientsCondition() { LogOrCondition logOrCondition = new LogOrCondition(); for (int i = 0; i < this.recipients.Length; i++) { if (this.recipients[i] != null) { string[] proxyAddresses = this.GetProxyAddresses(this.recipients[i]); if (proxyAddresses == null) { logOrCondition.Conditions.Add(this.GetFieldForAnyCondition(MessageTrackingField.RecipientAddress, this.recipients[i], "r" + i)); } else { for (int j = 0; j < proxyAddresses.Length; j++) { if (proxyAddresses[j] != null) { logOrCondition.Conditions.Add(this.GetFieldForAnyCondition(MessageTrackingField.RecipientAddress, proxyAddresses[j], string.Concat(new object[] { "r", i, "p", j }))); } } } } } return(logOrCondition); }
internal static LogCondition GetFieldStringComparison(MessageTrackingField field, string[] values) { LogOrCondition logOrCondition = new LogOrCondition(); foreach (string value in values) { LogCondition fieldStringComparison = TrackingSearch.GetFieldStringComparison(field, value); logOrCondition.Conditions.Add(fieldStringComparison); } return(logOrCondition); }
private LogCondition GetSenderCondition() { string[] proxyAddresses = this.GetProxyAddresses(this.sender); if (proxyAddresses == null || proxyAddresses.Length == 1) { return(this.GetFieldStringComparison(MessageTrackingField.SenderAddress, this.sender)); } LogOrCondition logOrCondition = new LogOrCondition(); foreach (string text in proxyAddresses) { if (text != null) { logOrCondition.Conditions.Add(this.GetFieldStringComparison(MessageTrackingField.SenderAddress, text)); } } return(logOrCondition); }