public TrackingContext(LogCache cache, DirectoryContext directoryContext, MessageTrackingReportId startingEventId) { this.tree = new EventTree(); this.cache = cache; this.directoryContext = directoryContext; this.startingEventId = startingEventId; }
public MessageTrackingSearchResult(MessageTrackingReportId identity, SmtpAddress fromAddress, string fromDisplayName, SmtpAddress[] recipientAddresses, string subject, DateTime submittedDateTime, string previousHopServer, string firstHopServer) { this.messageTrackingReportId = identity; this.fromAddress = fromAddress; this.fromDisplayName = fromDisplayName; this.recipientAddresses = recipientAddresses; this.submittedDateTime = submittedDateTime; this.subject = subject; this.previousHopServer = previousHopServer; this.firstHopServer = firstHopServer; }
public InternalGetMessageTrackingReportResponse GetMessageTrackingReport(GetMessageTrackingReportRequestTypeWrapper request, TimeSpan timeout) { this.ewsBinding.Timeout = (int)Math.Min(timeout.TotalMilliseconds, 2147483647.0); GetMessageTrackingReportResponseMessageType messageTrackingReport = this.ewsBinding.GetMessageTrackingReport(request.PrepareEWSRequest(this.serverVersion)); MessageTrackingReportId messageTrackingReportId; if (!MessageTrackingReportId.TryParse(request.WrappedRequest.MessageTrackingReportId, out messageTrackingReportId)) { throw new ArgumentException("Invalid MessageTrackingReportId, caller should have validated"); } return(InternalGetMessageTrackingReportResponse.Create(messageTrackingReportId.Domain, messageTrackingReport)); }
public GetMessageTrackingQuery(SmtpAddress proxyRecipient, DirectoryContext directoryContext, GetMessageTrackingReportRequestTypeWrapper request, ExchangeVersion minVersionRequested, TimeSpan timeout) : base(directoryContext.ClientContext, null, CasTraceEventType.MessageTracking, GetMessageTrackingApplication.MessageTrackingIOCompletion, InfoWorkerMessageTrackingPerformanceCounters.CurrentRequestDispatcherRequests) { MessageTrackingReportId messageTrackingReportId = null; if (!MessageTrackingReportId.TryParse(request.WrappedRequest.MessageTrackingReportId, out messageTrackingReportId)) { throw new ArgumentException("MessageTrackingReportId invalid"); } this.directoryContext = directoryContext; string address = ServerCache.Instance.GetOrgMailboxForDomain(messageTrackingReportId.Domain).ToString(); this.fakeRecipientQueryResults = MessageTrackingApplication.CreateFakeRecipientQueryResult(address); this.proxyRecipient = proxyRecipient; this.request = request; this.minVersionRequested = minVersionRequested; base.Timeout = timeout; }
public static bool TryParse(string identity, out MessageTrackingReportId identityObject) { if (identity == MessageTrackingReportId.LegacyExchangeValue) { identityObject = MessageTrackingReportId.LegacyExchange; return(true); } string value = null; string value2 = null; long? num = null; Guid? guid = null; bool? flag = null; string text = null; identityObject = null; string[] array = identity.Split(new char[] { ',' }); string[] array2 = array; int i = 0; while (i < array2.Length) { string text2 = array2[i]; string[] array3 = text2.Split(new char[] { '=' }); bool result; string text3; if (array3.Length != 2 || string.IsNullOrEmpty(array3[1])) { result = false; } else if (!MessageTrackingReportId.TryUnescapeSpecialCharacters(array3[1], out text3)) { result = false; } else { string key; if ((key = array3[0]) != null) { if (< PrivateImplementationDetails > { 555FE7EF - A8C8 - 4AA8 - 9F 87 - 0745861BF96F }.$$method0x6001364 - 1 == null)
public MessageTrackingReport(MessageTrackingReportId identity, DateTime submittedDateTime, string subject, SmtpAddress?fromAddress, string fromDisplayName, SmtpAddress[] recipientAddresses, string[] recipientDisplayNames, RecipientEventData eventData) { if (recipientAddresses == null) { throw new ArgumentNullException("recipientAddresses", "Param cannot be null, pass in empty SmtpAddress[] instead"); } if (recipientDisplayNames == null) { throw new ArgumentNullException("recipientDisplayNames", "Param cannot be null, pass in empty string[] instead"); } this.identity = identity; this.submittedDateTime = submittedDateTime; this.subject = subject; this.fromAddress = fromAddress; this.fromDisplayName = fromDisplayName; this.recipientAddresses = recipientAddresses; this.recipientDisplayNames = recipientDisplayNames; this.eventData = eventData; }
InternalGetMessageTrackingReportResponse IClientProxy.GetMessageTrackingReport(GetMessageTrackingReportRequestTypeWrapper request, TimeSpan timeout) { GetMessageTrackingQuery getMessageTrackingQuery = new GetMessageTrackingQuery(this.proxyRecipient, this.directoryContext, request, this.ewsVersionRequested, timeout); GetMessageTrackingQueryResult getMessageTrackingQueryResult = getMessageTrackingQuery.Execute(); if (getMessageTrackingQueryResult == null) { TraceWrapper.SearchLibraryTracer.TraceError(this.GetHashCode(), "Empty result in Request Dispatcher FindMessageTrackingQuery.Execute", new object[0]); return(null); } Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.GetMessageTrackingReportResponseMessageType response = getMessageTrackingQueryResult.Response; MessageTrackingReportId messageTrackingReportId; if (!MessageTrackingReportId.TryParse(request.WrappedRequest.MessageTrackingReportId, out messageTrackingReportId)) { throw new ArgumentException("Invalid MessageTrackingReportId, caller should have validated"); } return(InternalGetMessageTrackingReportResponse.Create(messageTrackingReportId.Domain, response)); }
internal static MessageTrackingSearchResult Create(FindMessageTrackingSearchResultType wsResult, string targetInfoForDisplay) { if (wsResult.Sender == null) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: Sender is null in FindMessageTrackingReport response from {0}", new object[] { targetInfoForDisplay }); } SmtpAddress smtpAddress = new SmtpAddress(wsResult.Sender.EmailAddress); if (!smtpAddress.IsValidAddress || string.IsNullOrEmpty(wsResult.Sender.Name)) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: Sender {0} is invalid in FindMessageTrackingReport response from {1}", new object[] { smtpAddress.ToString(), targetInfoForDisplay }); } smtpAddress = SmtpAddress.Parse(wsResult.Sender.EmailAddress); string name = wsResult.Sender.Name; EmailAddressType[] recipients = wsResult.Recipients; SmtpAddress[] array = new SmtpAddress[recipients.Length]; if (recipients == null || recipients.Length == 0) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: No recipients in FindMessageTrackingReport response from {0}", new object[] { targetInfoForDisplay }); } for (int i = 0; i < recipients.Length; i++) { if (recipients[i] == null) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: Null recipient in FindMessageTrackingReport response from {0}", new object[] { targetInfoForDisplay }); } array[i] = new SmtpAddress(recipients[i].EmailAddress); if (!array[i].IsValidAddress) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: Invalid Recipient {0} in FindMessageTrackingReport response from {1}", new object[] { array[i].ToString(), targetInfoForDisplay }); } } MessageTrackingReportId identity = null; if (!MessageTrackingReportId.TryParse(wsResult.MessageTrackingReportId, out identity)) { TrackingFatalException.RaiseED(ErrorCode.UnexpectedErrorPermanent, "WS-Response Validation Error: Invalid report ID {0} in FindMessageTrackingReport response from {1}", new object[] { wsResult.MessageTrackingReportId, targetInfoForDisplay }); } return(new MessageTrackingSearchResult(identity, smtpAddress, name, array, wsResult.Subject, wsResult.SubmittedTime, wsResult.PreviousHopServer, wsResult.FirstHopServer)); }
internal WSGetParameters(MessageTrackingReportId reportId, WebServiceTrackingAuthority wsAuthority) { this.MessageTrackingReportId = reportId; this.WSAuthority = wsAuthority; }