/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep(ISagaStorage sagaStorage, IRebusLoggerFactory rebusLoggerFactory) { if (sagaStorage == null) throw new ArgumentNullException(nameof(sagaStorage)); if (rebusLoggerFactory == null) throw new ArgumentNullException(nameof(rebusLoggerFactory)); _sagaStorage = sagaStorage; _log = rebusLoggerFactory.GetCurrentClassLogger(); }
/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep([NotNull] ISagaStorage sagaStorage, [NotNull] IRebusLoggerFactory rebusLoggerFactory, [NotNull] Options options) { if (rebusLoggerFactory == null) { throw new ArgumentNullException(nameof(rebusLoggerFactory)); } _sagaStorage = sagaStorage ?? throw new ArgumentNullException(nameof(sagaStorage)); _options = options ?? throw new ArgumentNullException(nameof(options)); _log = rebusLoggerFactory.GetLogger <LoadSagaDataStep>(); }
protected override void SetUp() { _factory = new RavenDbSagaStorageFactory(); _sagaStorage = _factory.GetSagaStorage(); _correlationProperties = new[] { new TestCorrelationProperty(nameof(BasicSagaData.Id), typeof(BasicSagaData)), new TestCorrelationProperty(nameof(BasicSagaData.StringField), typeof(BasicSagaData)), new TestCorrelationProperty(nameof(BasicSagaData.IntegerField), typeof(BasicSagaData)) }; }
/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep(ISagaStorage sagaStorage, IRebusLoggerFactory rebusLoggerFactory) { if (sagaStorage == null) { throw new ArgumentNullException(nameof(sagaStorage)); } if (rebusLoggerFactory == null) { throw new ArgumentNullException(nameof(rebusLoggerFactory)); } _sagaStorage = sagaStorage; _log = rebusLoggerFactory.GetLogger <LoadSagaDataStep>(); }
public MessageContext(IBus bus, IMessageSerializer serializer, ISagaStorage storage) { _bus = bus; _serializer = serializer; _storage = storage; Headers = new Dictionary <string, string>(); Version = "1"; LastRetry = true; Origin = new Origin(); SagaContext = new SagaContext(); Tracks = new List <Track>(); Identity = new Identity(); }
protected void SaveMessage(MessageContext messagecontext, ISagaStorage storage, SagaEntity sagaentity) { if (Configuration.Storage.SaveMessage) { try { var messageentity = CreateMessageEntity(messagecontext, sagaentity); storage.CreateMessage(messagecontext, messagecontext.SagaContext.Id, sagaentity, messageentity); } catch (Exception) { if (!Configuration.Storage.IgnoreExceptionOnSaveMessage) { throw; } } } }
/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep(ISagaStorage sagaStorage, IRebusLoggerFactory rebusLoggerFactory) { _sagaStorage = sagaStorage; _log = rebusLoggerFactory.GetCurrentClassLogger(); }
/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep(ISagaStorage sagaStorage, IRebusLoggerFactory rebusLoggerFactory) { _sagaStorage = sagaStorage ?? throw new ArgumentNullException(nameof(sagaStorage)); _log = rebusLoggerFactory?.GetLogger <LoadSagaDataStep>() ?? throw new ArgumentNullException(nameof(rebusLoggerFactory)); }
protected override void SetUp() { _factory = new RavenDbSagaStorageFactory(); _storage = _factory.GetSagaStorage(); }
protected AbstractSaga(Guid id, ISagaStorage <TState> storage) { Id = id; _sagaStorage = storage; }
public SlowSagaStorageDecorator(ISagaStorage sagaStorage, int delayMilliseconds) { _sagaStorage = sagaStorage; _delayMilliseconds = delayMilliseconds; }
public SagaStorageTap(ISagaStorage innerSagaStorage, ConcurrentDictionary <Guid, ISagaData> persistentSagaData) { _innerSagaStorage = innerSagaStorage; _persistentSagaData = persistentSagaData; }
protected override void SetUp() { _factory = new TFactory(); _sagaStorage = _factory.GetSagaStorage(); }
/// <summary> /// Constructs the step with the given saga storage /// </summary> public LoadSagaDataStep(ISagaStorage sagaStorage) { _sagaStorage = sagaStorage; }
public SagaService(ISagaStorage sagaStorage, ISagasBuffer sagasBuffer, IOptions <PoleSagasServerOption> poleSagasServerOption) { this.sagaStorage = sagaStorage; this.sagasBuffer = sagasBuffer; this.poleSagasServerOption = poleSagasServerOption.Value; }