/// <summary>
        /// Create new instance of <see cref="FindContactFolderResults"/>
        /// </summary>
        internal FindContactFolderResults(PageResponseCollection <ContactFolder> responseCollection)
        {
            responseCollection.ThrowIfNull(nameof(responseCollection));
            foreach (ContactFolder contactFolder in responseCollection.Value)
            {
                this.ContactFolders.Add(contactFolder);
            }

            this.MoreAvailable = responseCollection.HasNextLink;
        }
예제 #2
0
        /// <summary>
        /// Create new instance of <see cref="FindMailFolderResults"/>
        /// </summary>
        internal FindMailFolderResults(PageResponseCollection <MailFolder> responseCollection)
        {
            responseCollection.ThrowIfNull(nameof(responseCollection));
            foreach (MailFolder mailFolder in responseCollection.Value)
            {
                this.MailFolders.Add(mailFolder);
            }

            this.MoreAvailable = responseCollection.HasNextLink;
        }
예제 #3
0
        /// <summary>
        /// Find item results.
        /// </summary>
        internal FindItemResults(PageResponseCollection <T> pageResponseCollection)
            : base()
        {
            pageResponseCollection.ThrowIfNull(nameof(pageResponseCollection));
            foreach (T item in pageResponseCollection.Value)
            {
                this.Items.Add(item);
            }

            this.MoreAvailable = pageResponseCollection.HasNextLink;
        }
예제 #4
0
        /// <summary>
        /// Create new instance of <see cref="SyncStateQuery{T}"/>
        /// </summary>
        /// <param name="pageResponseCollection"></param>
        internal SyncStateQuery(PageResponseCollection <T> pageResponseCollection)
        {
            pageResponseCollection.ThrowIfNull(nameof(pageResponseCollection));
            if (pageResponseCollection.HasDeltaLink)
            {
                this.Initialize(
                    pageResponseCollection.DeltaLink,
                    TokenType.DeltaToken);
            }

            else if (pageResponseCollection.HasNextLink)
            {
                this.Initialize(
                    pageResponseCollection.NextLink,
                    TokenType.SkipToken);
            }

            else
            {
                throw new ArgumentException("Page response doesn't contain paging link.");
            }
        }