private static bool CheckValidAndFixupIfNeeded(Microsoft.Exchange.SoapWebClient.EWS.GetMessageTrackingReportResponseMessageType response) { if (response == null) { TraceWrapper.SearchLibraryTracer.TraceError(0, "Empty/Invalid response for GetMessageTrackingReport", new object[0]); return(false); } if (response.MessageTrackingReport == null) { if (response.ResponseClass == Microsoft.Exchange.SoapWebClient.EWS.ResponseClassType.Success && response.Errors == null && response.Errors.Length == 0) { TraceWrapper.SearchLibraryTracer.TraceError(0, "Empty/Invalid response for GetMessageTrackingReport is only permitted if there were errors", new object[0]); return(false); } TraceWrapper.SearchLibraryTracer.TraceError(0, "Fixing up error response by inserting empty MessageTrackingReportType", new object[0]); response.MessageTrackingReport = new Microsoft.Exchange.SoapWebClient.EWS.MessageTrackingReportType(); } return(true); }
private InternalGetMessageTrackingReportResponse(string domain, Microsoft.Exchange.SoapWebClient.EWS.GetMessageTrackingReportResponseMessageType response) { this.Response = response; this.RecipientTrackingEvents = InternalGetMessageTrackingReportResponse.CreateEventList <Microsoft.Exchange.SoapWebClient.EWS.RecipientTrackingEventType>(domain, response.MessageTrackingReport.RecipientTrackingEvents, InternalGetMessageTrackingReportResponse.ewsConversionDelegate); response.MessageTrackingReport.RecipientTrackingEvents = null; }
internal static InternalGetMessageTrackingReportResponse Create(string domain, Microsoft.Exchange.SoapWebClient.EWS.GetMessageTrackingReportResponseMessageType response) { if (!InternalGetMessageTrackingReportResponse.CheckValidAndFixupIfNeeded(response)) { return(null); } return(new InternalGetMessageTrackingReportResponse(domain, response)); }