public override FeedIterator GetStandByFeedIterator( string continuationToken = null, int?maxItemCount = null, StandByFeedIteratorRequestOptions requestOptions = null) { StandByFeedIteratorRequestOptions cosmosQueryRequestOptions = requestOptions ?? new StandByFeedIteratorRequestOptions(); return(new StandByFeedIteratorCore( clientContext: this.ClientContext, continuationToken: continuationToken, maxItemCount: maxItemCount, container: this, options: cosmosQueryRequestOptions)); }
/// <summary> /// Fill the CosmosRequestMessage headers with the set properties /// </summary> /// <param name="request">The <see cref="RequestMessage"/></param> internal override void PopulateRequestOptions(RequestMessage request) { // Check if no Continuation Token is present if (string.IsNullOrEmpty(request.Headers.IfNoneMatch)) { if (this.StartTime == null) { request.Headers.IfNoneMatch = StandByFeedIteratorRequestOptions.IfNoneMatchAllHeaderValue; } else if (this.StartTime != null && this.StartTime != StandByFeedIteratorRequestOptions.DateTimeStartFromBeginning) { request.Headers.Add(HttpConstants.HttpHeaders.IfModifiedSince, this.StartTime.Value.ToUniversalTime().ToString("r", CultureInfo.InvariantCulture)); } } StandByFeedIteratorRequestOptions.FillMaxItemCount(request, this.MaxItemCount); request.Headers.Add(HttpConstants.HttpHeaders.A_IM, HttpConstants.A_IMHeaderValues.IncrementalFeed); base.PopulateRequestOptions(request); }
public abstract FeedIterator GetStandByFeedIterator( string continuationToken = default, int?maxItemCount = default, StandByFeedIteratorRequestOptions requestOptions = default);