public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.RawFailure != null && CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { WellKnownException.ConflictEntryIdCorruption })); }
public static IReservation CreateReservation(string serverFQDN, NetworkCredential credentials, Guid mailboxGuid, TenantPartitionHint partitionHint, Guid resourceId, ReservationFlags flags) { if (serverFQDN == null) { TestIntegration testIntegration = new TestIntegration(false); if ((flags.HasFlag(ReservationFlags.Read) && testIntegration.UseRemoteForSource) || (flags.HasFlag(ReservationFlags.Write) && testIntegration.UseRemoteForDestination)) { serverFQDN = CommonUtils.LocalComputerName; } } IReservation result = null; ExecutionContext.Create(new DataContext[] { new OperationDataContext("IReservationManager.ReserveResources", OperationType.None), new SimpleValueDataContext("MailboxGuid", mailboxGuid), new SimpleValueDataContext("ResourceId", resourceId), new SimpleValueDataContext("Flags", flags) }).Execute(delegate { if (serverFQDN == null) { result = ReservationManager.CreateReservation(mailboxGuid, partitionHint, resourceId, flags, CommonUtils.LocalComputerName); return; } result = RemoteReservation.Create(serverFQDN, credentials, mailboxGuid, partitionHint, resourceId, flags); }); return(new ReservationWrapper(result)); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.RawFailure != null && CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { WellKnownException.InvalidMultivalueElement })); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.RawFailure != null && CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { WellKnownException.NonCanonicalACL })); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.RawFailure != null && message.Failure != null && message.Failure.Message != null && CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { WellKnownException.CorruptData }) && message.Failure.Message.Contains("[String]") && (message.Failure.Message.Contains("[{00062008-0000-0000-c000-000000000046}:0x853a]") || message.Failure.Message.Contains("[{00020329-0000-0000-c000-000000000046}:'Keywords']"))); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.RawFailure != null && CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { WellKnownException.CorruptRecipient }) && message.MessageClass == "IPM.Note.Microsoft.CDR.UM"); }
public void Classify(BadMessageRec item, TestIntegration testIntegration) { foreach (BadItemCategory badItemCategory in BadItemClassifier.categories) { if (badItemCategory.IsMatch(item, testIntegration)) { item.Category = badItemCategory.Name; break; } } }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { if (message == null) { return(false); } bool result = true; if (this.badItemKind != null && message.Kind != this.badItemKind.Value) { result = false; } if (this.wke != null && !CommonUtils.ExceptionIs(message.RawFailure, new WellKnownException[] { this.wke.Value })) { result = false; } return(result); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(true); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.Failure != null && message.Failure.Message != null && message.Failure.Message.Contains("Lid: 37736 dwParam: 0x") && message.Failure.Message.Contains("Lid: 55288 StoreEc: 0x80040117")); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.MessageClass != null && ObjectClass.IsDistributionList(message.MessageClass)); }
private static bool ExportMessageBatch(ISourceMailbox mailbox, List <MessageRec> messages, Func <IFxProxyPool> getProxyPool, ExportMessagesFlags flags, PropTag[] propsToCopyExplicitly, PropTag[] excludeProps, TestIntegration testIntegration, out Exception failure) { failure = null; try { using (IFxProxyPool fxProxyPool = getProxyPool()) { mailbox.ExportMessages(messages, fxProxyPool, flags, propsToCopyExplicitly, excludeProps); } return(true); } catch (Exception ex) { if (!MapiUtils.IsBadItemIndicator(ex, out failure)) { if (failure != ex) { failure.PreserveExceptionStack(); throw failure; } throw; } } return(false); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(testIntegration.ClassifyBadItemFaults && (message != null && message.Failure != null && message.Failure.Message != null) && message.Failure.Message.Contains("Lid: 48184 StoreEc: 0x8000400")); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message.Failure != null && message.Failure.DataContext != null && message.Failure.Message != null && message.Failure.FailureSideInt == 2 && !(message.Failure.FailureType != "ObjectValidationException") && message.Failure.DataContext.Contains("ISourceMailbox.ExportMessages") && message.Failure.Message.Contains(this.failureSignature)); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && message.Failure != null && message.Failure.DataContext != null && message.Failure.Message != null && message.Failure.FailureSideInt == 2 && !(message.Failure.FailureType != "ObjectValidationException") && message.Failure.DataContext.Contains("ISourceMailbox.ExportMessages") && message.Failure.Message.Contains("Microsoft.Exchange.Data.Storage.RecurrenceBlobConstraint")); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && FolderFilterParser.IsDumpster(message.WellKnownFolderType)); }
public override bool IsMatch(BadMessageRec message, TestIntegration testIntegration) { return(message != null && (message.MessageClass == null || !ObjectClass.IsContact(message.MessageClass)) && message.DateSent != null && message.DateSent.Value < DateTime.UtcNow - this.ageLimit); }
public abstract bool IsMatch(BadMessageRec message, TestIntegration testIntegration);
public static void ExportMessagesWithBadItemDetection(ISourceMailbox mailbox, List <MessageRec> messages, Func <IFxProxyPool> getProxyPool, ExportMessagesFlags flags, PropTag[] propsToCopyExplicitly, PropTag[] excludeProps, TestIntegration testIntegration, ref List <BadMessageRec> badMessages) { MrsTracer.Common.Debug("ExportMessagesWithBadItemDetection: Exporting {0} messages", new object[] { messages.Count }); Exception ex; if (MapiUtils.ExportMessageBatch(mailbox, messages, getProxyPool, flags, propsToCopyExplicitly, excludeProps, testIntegration, out ex)) { return; } MrsTracer.Common.Warning("ExportMessages failed with a bad item error. Current batch count {0}. Will retry copying messages in smaller batches. {1}", new object[] { messages.Count, CommonUtils.FullExceptionMessage(ex) }); if (messages.Count != 1) { int num = messages.Count / 2; List <MessageRec> list = new List <MessageRec>(num); List <MessageRec> list2 = new List <MessageRec>(messages.Count - num); for (int i = 0; i < messages.Count; i++) { if (i < num) { list.Add(messages[i]); } else { list2.Add(messages[i]); } } MapiUtils.ExportMessagesWithBadItemDetection(mailbox, list, getProxyPool, flags, propsToCopyExplicitly, excludeProps, testIntegration, ref badMessages); MapiUtils.ExportMessagesWithBadItemDetection(mailbox, list2, getProxyPool, flags, propsToCopyExplicitly, excludeProps, testIntegration, ref badMessages); return; } MessageRec messageRec = messages[0]; MrsTracer.Common.Warning("Single message {0} copy failed. Error {1}", new object[] { TraceUtils.DumpEntryId(messageRec.EntryId), CommonUtils.FullExceptionMessage(ex) }); EntryIdMap <MessageRec> entryIdMap; EntryIdMap <FolderRec> entryIdMap2; MapiUtils.LookupBadMessagesInMailbox(mailbox, messages, out entryIdMap, out entryIdMap2); MessageRec msgData; if (!entryIdMap.TryGetValue(messageRec.EntryId, out msgData)) { badMessages.Add(BadMessageRec.MissingItem(messageRec)); return; } DownlevelBadItemsPermanentException ex2 = ex as DownlevelBadItemsPermanentException; if (ex2 != null) { badMessages.Add(ex2.BadItems[0]); return; } FolderRec folderRec = entryIdMap2[messageRec.FolderId]; badMessages.Add(BadMessageRec.Item(msgData, folderRec, ex)); }