Skip to content

IStreamGenerator Methods

Interface of generators used by the GeneratorStreamProvider. Any method of generating events must conform to this interface to be used by the GeneratorStreamProvider.

Configure(IServiceProvider, IStreamGeneratorConfig)

abstract
public abstract void Configure(IServiceProvider serviceProvider, IStreamGeneratorConfig generatorConfig)
Configures the stream generator.

Parameters

serviceProviderIServiceProvider
The service provider.
generatorConfigIStreamGeneratorConfig
The generator configuration.

TryReadEvents(DateTime, int, List<IBatchContainer>)

abstract
public abstract bool TryReadEvents(DateTime utcNow, int maxCount, out List<IBatchContainer> events)
Tries to get an event, if the generator is configured to generate any at this time

Parameters

utcNowDateTime
The current UTC time.
maxCountint
The maximum number of events to read.
eventsList<IBatchContainer>
The events.

Returns

true if events were read, false otherwise.