예제 #1
0
        private static void AddFailedItemsToCollection(IFailedItemStorage store, Guid mailboxGuid, long referenceDocId, int pageSize, List <NonIndexableItem> nonIndexableItems)
        {
            FailedItemParameters parameters = new FailedItemParameters(FailureMode.All, FieldSet.Default)
            {
                MailboxGuid     = new Guid?(mailboxGuid),
                StartingIndexId = referenceDocId,
                ResultLimit     = pageSize
            };

            foreach (IFailureEntry failureEntry in store.GetFailedItems(parameters))
            {
                MdbItemIdentity mdbItemIdentity = (MdbItemIdentity)failureEntry.ItemId;
                nonIndexableItems.Add(new NonIndexableItem
                {
                    CompositeId        = mdbItemIdentity,
                    ErrorCode          = NonIndexableItem.ConvertSearchErrorCode(failureEntry.ErrorCode),
                    ErrorDescription   = failureEntry.ErrorDescription.ToString(),
                    IsPartiallyIndexed = failureEntry.IsPartiallyIndexed,
                    IsPermanentFailure = failureEntry.IsPermanentFailure,
                    AttemptCount       = failureEntry.AttemptCount,
                    LastAttemptTime    = failureEntry.LastAttemptTime,
                    AdditionalInfo     = failureEntry.AdditionalInfo,
                    SortValue          = IndexId.CreateIndexId(mdbItemIdentity.MailboxNumber, mdbItemIdentity.DocumentId).ToString()
                });
            }
        }
예제 #2
0
        private static List <NonIndexableItem> ConvertFromWebServiceFailedItemsCollection(NonIndexableItem[] sourceNonIndexableItems)
        {
            List <NonIndexableItem> list = new List <NonIndexableItem>(sourceNonIndexableItems.Length);

            foreach (NonIndexableItem nonIndexableItem in sourceNonIndexableItems)
            {
                list.Add(new NonIndexableItem
                {
                    ItemId             = nonIndexableItem.ItemId,
                    ErrorCode          = NonIndexableItem.ConvertSearchErrorCode(nonIndexableItem.ErrorCode.ToString()),
                    ErrorDescription   = nonIndexableItem.ErrorDescription,
                    IsPartiallyIndexed = nonIndexableItem.IsPartiallyIndexed,
                    IsPermanentFailure = nonIndexableItem.IsPermanentFailure,
                    AttemptCount       = nonIndexableItem.AttemptCount,
                    LastAttemptTime    = nonIndexableItem.LastAttemptTime,
                    AdditionalInfo     = nonIndexableItem.AdditionalInfo,
                    SortValue          = nonIndexableItem.SortValue
                });
            }
            return(list);
        }
예제 #3
0
 public static ItemIndexError ConvertSearchErrorCode(EvaluationErrors searchErrorCode)
 {
     return(NonIndexableItem.ConvertSearchErrorCode(searchErrorCode.ToString()));
 }