public InMemorySagaConsumeContext(ConsumeContext <TMessage> context, SagaInstance <TSaga> instance, IndexedSagaDictionary <TSaga> sagas) : base(context) { _sagas = sagas; _instance = instance; }
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)); }
public InMemorySagaRepository() { _sagas = new IndexedSagaDictionary <TSaga>(); }