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; }
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; }
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; }
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(); }
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; }