Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentFeedObserver" /> class.
        /// Saves input DocumentClient and DocumentCollectionInfo parameters to class fields
        /// </summary>
        /// <param name="client"> Client connected to destination collection </param>
        /// <param name="destCollInfo"> Destination collection information </param>
        public DocumentFeedObserver(ChangeFeedDataProcessConfiguration dataProcessConfiguration)
        {
            this.ChangeFeedDataProcessor = dataProcessConfiguration.ChangeFeedDataProcessor;
            var checkpointStrategy = CreateBatchCheckpointStrategy(dataProcessConfiguration.BatchSize);

            _checkpoint = (context, data) => checkpointStrategy(context.CheckpointAsync, data);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventHubConsumer"/> class.
 /// </summary>
 /// <param name="hostName">Name of the host.</param>
 /// <param name="config">The configuration.</param>
 public ChangeFeedConsumer(string hostName, ChangeFeedDataProcessConfiguration config)
 {
     this.Config   = config;
     this.HostName = hostName;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentFeedObserverFactory" /> class.
 /// Saves input DocumentClient and DocumentCollectionInfo parameters to class fields
 /// </summary>
 /// <param name="destCollInfo">Destination collection information</param>
 public DocumentFeedObserverFactory(ChangeFeedDataProcessConfiguration dataProcessConfiguration)
 {
     this.DataProcessConfiguration = dataProcessConfiguration;
 }