protected override IEnumerable <T> InternalFindPaged <T>(QueryFilter filter, ObjectId rootId, bool deepSearch, SortBy sortBy, int pageSize) { MessageCategoryId messageCategoryId = rootId as MessageCategoryId; if (sortBy != null) { throw new NotSupportedException("sortBy"); } if (rootId != null && messageCategoryId == null) { throw new NotSupportedException("rootId"); } MasterCategoryList categoryList = base.MailboxSession.GetMasterCategoryList(); if (messageCategoryId == null || (messageCategoryId.Name == null && messageCategoryId.CategoryId == null)) { foreach (Category category in categoryList) { yield return((T)((object)this.ConvertCategoryToPresentationObject(category))); } } else if (messageCategoryId.CategoryId != null) { Category category2 = categoryList[messageCategoryId.CategoryId.Value]; yield return((T)((object)this.ConvertCategoryToPresentationObject(category2))); } else { Category category3 = categoryList[messageCategoryId.Name]; if (category3 != null) { yield return((T)((object)this.ConvertCategoryToPresentationObject(category3))); } } yield break; }
public override bool Equals(XsoMailboxObjectId other) { MessageCategoryId messageCategoryId = other as MessageCategoryId; return(!(null == messageCategoryId) && ADObjectId.Equals(base.MailboxOwnerId, other.MailboxOwnerId) && object.Equals(this.categoryId ?? Guid.Empty, messageCategoryId.CategoryId ?? Guid.Empty)); }