public override FeedIterator <T> GetChangeFeedIterator <T>( ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = null) { if (changeFeedStartFrom == null) { throw new ArgumentNullException(nameof(changeFeedStartFrom)); } if (changeFeedMode == null) { throw new ArgumentNullException(nameof(changeFeedMode)); } NetworkAttachedDocumentContainer networkAttachedDocumentContainer = new NetworkAttachedDocumentContainer( this, this.queryClient, changeFeedRequestOptions: changeFeedRequestOptions); DocumentContainer documentContainer = new DocumentContainer(networkAttachedDocumentContainer); ChangeFeedIteratorCore changeFeedIteratorCore = new ChangeFeedIteratorCore( documentContainer: documentContainer, changeFeedStartFrom: changeFeedStartFrom, changeFeedMode: changeFeedMode, changeFeedRequestOptions: changeFeedRequestOptions, clientContext: this.ClientContext); return(new FeedIteratorCore <T>( changeFeedIteratorCore, responseCreator: this.ClientContext.ResponseFactory.CreateChangeFeedUserTypeResponse <T>)); }
public override FeedIterator GetChangeFeedStreamIterator( ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = null) { if (changeFeedStartFrom == null) { throw new ArgumentNullException(nameof(changeFeedStartFrom)); } if (changeFeedMode == null) { throw new ArgumentNullException(nameof(changeFeedMode)); } NetworkAttachedDocumentContainer networkAttachedDocumentContainer = new NetworkAttachedDocumentContainer( this, this.queryClient, changeFeedRequestOptions: changeFeedRequestOptions); DocumentContainer documentContainer = new DocumentContainer(networkAttachedDocumentContainer); return(new ChangeFeedIteratorCore( documentContainer: documentContainer, changeFeedStartFrom: changeFeedStartFrom, changeFeedMode: changeFeedMode, changeFeedRequestOptions: changeFeedRequestOptions, clientContext: this.ClientContext)); }
public override IAsyncEnumerable <TryCatch <ChangeFeedPage> > GetChangeFeedAsyncEnumerable( ChangeFeedCrossFeedRangeState state, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = default) { return(base.GetChangeFeedAsyncEnumerable(state, changeFeedMode, changeFeedRequestOptions)); }
public override FeedIterator <T> GetChangeFeedIterator <T>( ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = null) { return(base.GetChangeFeedIterator <T>(changeFeedStartFrom, changeFeedMode, changeFeedRequestOptions)); }
public override IAsyncEnumerable <TryCatch <ChangeFeed.ChangeFeedPage> > GetChangeFeedAsyncEnumerable( ChangeFeedCrossFeedRangeState state, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = default) { NetworkAttachedDocumentContainer networkAttachedDocumentContainer = new NetworkAttachedDocumentContainer( this, this.queryClient, changeFeedRequestOptions: changeFeedRequestOptions); DocumentContainer documentContainer = new DocumentContainer(networkAttachedDocumentContainer); Dictionary <string, string> additionalHeaders; if ((changeFeedRequestOptions?.Properties != null) && changeFeedRequestOptions.Properties.Any()) { Dictionary <string, object> additionalNonStringHeaders = new Dictionary <string, object>(); additionalHeaders = new Dictionary <string, string>(); foreach (KeyValuePair <string, object> keyValuePair in changeFeedRequestOptions.Properties) { if (keyValuePair.Value is string stringValue) { additionalHeaders[keyValuePair.Key] = stringValue; } else { additionalNonStringHeaders[keyValuePair.Key] = keyValuePair.Value; } } changeFeedRequestOptions.Properties = additionalNonStringHeaders; } else { additionalHeaders = null; } ChangeFeedPaginationOptions changeFeedPaginationOptions = new ChangeFeedPaginationOptions( changeFeedMode, changeFeedRequestOptions?.PageSizeHint, changeFeedRequestOptions?.JsonSerializationFormatOptions?.JsonSerializationFormat, additionalHeaders); return(new ChangeFeedCrossFeedRangeAsyncEnumerable( documentContainer, state, changeFeedPaginationOptions, changeFeedRequestOptions?.JsonSerializationFormatOptions)); }
public override IAsyncEnumerable <TryCatch <ChangeFeed.ChangeFeedPage> > GetChangeFeedAsyncEnumerable( ChangeFeedCrossFeedRangeState state, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = default) { NetworkAttachedDocumentContainer networkAttachedDocumentContainer = new NetworkAttachedDocumentContainer( this, this.queryClient, new CosmosDiagnosticsContextCore()); DocumentContainer documentContainer = new DocumentContainer(networkAttachedDocumentContainer); return(new ChangeFeedCrossFeedRangeAsyncEnumerable( documentContainer, changeFeedMode, changeFeedRequestOptions, state)); }
public abstract FeedIterator <T> GetChangeFeedIterator <T>( ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = null);
public abstract IAsyncEnumerable <TryCatch <ChangeFeedPage> > GetChangeFeedAsyncEnumerable( ChangeFeedCrossFeedRangeState state, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions = null);