Exemplo n.º 1
0
 public SagasCompensateRetryBackgroundService(IOptions <PoleSagasOption> options, SagaClient sagaClient, IServiceProvider serviceProvider, IEventSender eventSender, ILogger <SagasCompensateRetryBackgroundService> logger)
 {
     this.options     = options.Value;
     this.sagaClient  = sagaClient;
     sagaRestorer     = new SagaRestorer(serviceProvider.GetRequiredService <ISnowflakeIdGenerator>(), serviceProvider, serviceProvider.GetRequiredService <IEventSender>(), this.options, serviceProvider.GetRequiredService <ISerializer>(), serviceProvider.GetRequiredService <IActivityFinder>());
     this.eventSender = eventSender;
     this.logger      = logger;
 }
Exemplo n.º 2
0
 public SagaRestorer(ISnowflakeIdGenerator snowflakeIdGenerator, IServiceProvider serviceProvider, IEventSender eventSender, PoleSagasOption poleSagasOption, ISerializer serializer, IActivityFinder activityFinder)
 {
     this.snowflakeIdGenerator = snowflakeIdGenerator;
     this.serviceProvider      = serviceProvider;
     this.eventSender          = eventSender;
     this.poleSagasOption      = poleSagasOption;
     this.serializer           = serializer;
     this.activityFinder       = activityFinder;
 }
Exemplo n.º 3
0
 public SagaFactory(ISnowflakeIdGenerator snowflakeIdGenerator, IServiceProvider serviceProvider, IEventSender eventSender, IOptions <PoleSagasOption> poleSagasOption, ISerializer serializer, IActivityFinder activityFinder)
 {
     this.snowflakeIdGenerator = snowflakeIdGenerator;
     this.serviceProvider      = serviceProvider;
     this.eventSender          = eventSender;
     this.poleSagasOption      = poleSagasOption.Value;
     this.serializer           = serializer;
     this.activityFinder       = activityFinder;
 }
Exemplo n.º 4
0
 internal Saga(ISnowflakeIdGenerator snowflakeIdGenerator, IServiceProvider serviceProvider, IEventSender eventSender, PoleSagasOption poleSagasOption, ISerializer serializer, IActivityFinder activityFinder)
 {
     this.snowflakeIdGenerator = snowflakeIdGenerator;
     this.serviceProvider      = serviceProvider;
     this.eventSender          = eventSender;
     this.poleSagasOption      = poleSagasOption;
     this.serializer           = serializer;
     this.activityFinder       = activityFinder;
     Id = snowflakeIdGenerator.NextId();
 }
Exemplo n.º 5
0
 internal Saga(ISnowflakeIdGenerator snowflakeIdGenerator, IServiceProvider serviceProvider, IEventSender eventSender, PoleSagasOption poleSagasOption, ISerializer serializer, IActivityFinder activityFinder, string id)
 {
     this.snowflakeIdGenerator = snowflakeIdGenerator;
     this.serviceProvider      = serviceProvider;
     this.eventSender          = eventSender;
     this.poleSagasOption      = poleSagasOption;
     this.serializer           = serializer;
     this.activityFinder       = activityFinder;
     Id = id;
     this.currentExecuteOrder = -1;
 }