Пример #1
0
            static ISagaRepository <ReadOnlyInstance> CreateSagaRepository()
            {
                var provider       = new SQLiteSessionFactoryProvider(false, typeof(ReadOnlyInstanceMap));
                var sessionFactory = provider.GetSessionFactory();
                ISagaRepository <ReadOnlyInstance> sagaRepository = NHibernateSagaRepository <ReadOnlyInstance> .Create(sessionFactory);

                return(sagaRepository);
            }
Пример #2
0
            protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
            {
                _machine        = new TestStateMachine();
                _sessionFactory = new SQLiteSessionFactoryProvider(typeof(InstanceMap))
                                  .GetSessionFactory();

                _repository = NHibernateSagaRepository <Instance> .Create(_sessionFactory);

                configurator.StateMachineSaga(_machine, _repository);
            }
Пример #3
0
            protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
            {
                _provider       = new SQLiteSessionFactoryProvider(false, typeof(MissingInstanceMap));
                _sessionFactory = _provider.GetSessionFactory();
                _sagaRepository = new Lazy <ISagaRepository <MissingInstance> >(() => NHibernateSagaRepository <MissingInstance> .Create(_sessionFactory));

                _machine = new TestStateMachine();

                configurator.StateMachineSaga(_machine, _sagaRepository.Value);
            }
Пример #4
0
 public Locating_an_existing_saga()
 {
     _provider       = new SQLiteSessionFactoryProvider(false, typeof(SimpleSagaMap));
     _sessionFactory = _provider.GetSessionFactory();
     _sagaRepository = new Lazy <ISagaRepository <SimpleSaga> >(() => NHibernateSagaRepository <SimpleSaga> .Create(_sessionFactory));
 }