protected override IEnumerable <T> InternalFindPaged <T>(QueryFilter filter, ObjectId rootId, bool deepSearch, SortBy sortBy, int pageSize)
        {
            if (filter != null && !(filter is FalseFilter))
            {
                throw new NotSupportedException("filter");
            }
            if (sortBy != null)
            {
                throw new NotSupportedException("sortBy");
            }
            if (rootId != null && !(rootId is MailboxStoreObjectId))
            {
                throw new NotSupportedException("rootId: " + rootId.GetType().FullName);
            }
            if (!typeof(MailMessage).GetTypeInfo().IsAssignableFrom(typeof(T).GetTypeInfo()))
            {
                throw new NotSupportedException("FindPaged: " + typeof(T).FullName);
            }
            MailboxStoreObjectId messageId = rootId as MailboxStoreObjectId;

            if (messageId != null)
            {
                MailMessage mailMessage = new MailMessage();
                try
                {
                    using (MessageItem messageItem = MessageItem.Bind(base.MailboxSession, messageId.StoreObjectId, mailMessage.Schema.AllDependentXsoProperties))
                    {
                        mailMessage.LoadDataFromXso(messageId.MailboxOwnerId, messageItem);
                        mailMessage.SetRecipients(messageItem.Recipients);
                    }
                }
                catch (ObjectNotFoundException)
                {
                    yield break;
                }
                yield return((T)((object)mailMessage));
            }
            yield break;
        }
        public override bool Equals(XsoMailboxObjectId other)
        {
            MailboxStoreObjectId mailboxStoreObjectId = other as MailboxStoreObjectId;

            return(!(null == mailboxStoreObjectId) && ADObjectId.Equals(base.MailboxOwnerId, other.MailboxOwnerId) && object.Equals(this.storeObjectId, mailboxStoreObjectId.StoreObjectId));
        }