コード例 #1
0
 public InMemorySagaConsumeContext(ConsumeContext <TMessage> context, SagaInstance <TSaga>
                                   instance, IndexedSagaDictionary <TSaga> sagas)
     : base(context)
 {
     _sagas    = sagas;
     _instance = instance;
 }
コード例 #2
0
        ISagaRepository <T> CreateInMemorySagaRepository <T>()
            where T : class, ISaga
        {
            var dictionary = new IndexedSagaDictionary <T>();

            ISagaConsumeContextFactory <IndexedSagaDictionary <T>, T> factory = new InMemorySagaConsumeContextFactory <T>();

            ISagaRepositoryContextFactory <T> repositoryContextFactory = new InMemorySagaRepositoryContextFactory <T>(dictionary, factory);

            return(new SagaRepository <T>(repositoryContextFactory));
        }
コード例 #3
0
 public InMemorySagaRepository()
 {
     _sagas = new IndexedSagaDictionary <TSaga>();
 }