public static ISagaRepository <TSaga> Create(Func <CloudTable> tableFactory)
        {
            var consumeContextFactory = new SagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga>();

            var repositoryContextFactory = new AzureTableSagaRepositoryContextFactory <TSaga>(tableFactory, consumeContextFactory);

            return(new SagaRepository <TSaga>(repositoryContextFactory));
        }
Exemplo n.º 2
0
        public static ISagaRepository <TSaga> Create(Func <CloudTable> tableFactory, ISagaKeyFormatter <TSaga> keyFormatter)
        {
            var consumeContextFactory = new SagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga>();

            var cloudTableProvider = new DelegateCloudTableProvider <TSaga>(tableFactory);

            var repositoryContextFactory = new AzureTableSagaRepositoryContextFactory <TSaga>(cloudTableProvider, consumeContextFactory, keyFormatter);

            return(new SagaRepository <TSaga>(repositoryContextFactory));
        }