/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="serializationManager"></param>
 /// <param name="settings"></param>
 public EventHubPartitionDataGenerator(Logger logger, SerializationManager serializationManager, EventHubGeneratorStreamProviderSettings settings)
 {
     this.logger               = logger.GetSubLogger(this.GetType().Name);
     this.generators           = new List <IStreamDataGenerator <EventData> >();
     this.serializationManager = serializationManager;
     this.settings             = settings;
 }
Beispiel #2
0
 /// <summary>
 /// Init method
 /// </summary>
 /// <param name="providerCfg"></param>
 /// <param name="providerName"></param>
 /// <param name="log"></param>
 /// <param name="svcProvider"></param>
 public override void Init(IProviderConfiguration providerCfg, string providerName, Logger log, IServiceProvider svcProvider)
 {
     this.EventHubReceiverFactory = this.EHGeneratorReceiverFactory;
     this.ehGeneratorSettings     = new EventHubGeneratorStreamProviderSettings(providerName);
     this.ehGeneratorSettings.PopulateDataGeneratingConfigFromProviderConfig(providerCfg);
     base.Init(providerCfg, providerName, log, svcProvider);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="streamId"></param>
 /// <param name="settings"></param>
 /// <param name="logger"></param>
 /// <param name="serializationManager"></param>
 public SimpleStreamEventDataGenerator(IStreamIdentity streamId, EventHubGeneratorStreamProviderSettings settings,
                                       Logger logger, SerializationManager serializationManager)
 {
     this.StreamId             = streamId;
     this.logger               = logger.GetSubLogger(this.GetType().Name);
     this.ShouldProduce        = true;
     this.serializationManager = serializationManager;
 }
 /// <summary>
 /// Init method
 /// </summary>
 /// <param name="providerCfg"></param>
 /// <param name="providerName"></param>
 /// <param name="log"></param>
 /// <param name="svcProvider"></param>
 public override void Init(IProviderConfiguration providerCfg, string providerName, Logger log, IServiceProvider svcProvider)
 {
     this.CheckpointerFactory     = partition => Task.FromResult <IStreamQueueCheckpointer <string> >(NoOpCheckpointer.Instance);
     this.EventHubReceiverFactory = this.EHGeneratorReceiverFactory;
     this.ehGeneratorSettings     = new EventHubGeneratorStreamProviderSettings(providerName);
     this.ehGeneratorSettings.PopulateDataGeneratingConfigFromProviderConfig(providerCfg);
     base.Init(providerCfg, providerName, log, svcProvider);
 }
 /// <summary>
 /// Generate mocked eventhub partition Ids from EventHubGeneratorStreamProviderSettings
 /// </summary>
 /// <returns></returns>
 protected override Task <string[]> GetPartitionIdsAsync()
 {
     return(Task.FromResult(EventHubGeneratorStreamProviderSettings.GenerateEventHubPartitions(this.ehGeneratorSettings.EventHubPartitionCount)));
 }