/// <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; }
/// <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; }
/// <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; }
/// <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."); } }