Пример #1
0
        protected override void Setup(FeatureConfigurationContext context)
        {
            var settings = context.Settings;
            var jsonSerializerSettings = SagaSettings.GetJsonSerializerSettings(settings);
            var readerCreator          = SagaSettings.GetReaderCreator(settings);
            var writerCreator          = SagaSettings.GetWriterCreator(settings);
            var infoCache = new SagaInfoCache(jsonSerializerSettings, readerCreator, writerCreator);
            var persister = new SagaPersister(infoCache);

            context.Container.RegisterSingleton <ISagaPersister>(persister);

            idGenerator.Initialize(infoCache);
            infoCache.Initialize(settings.Get <SagaMetadataCollection>());
        }
 public SagaPersister(SagaInfoCache sagaInfoCache)
 {
     this.sagaInfoCache = sagaInfoCache;
 }
 public void Initialize(SagaInfoCache sagaInfoCache)
 {
     this.sagaInfoCache = sagaInfoCache;
 }