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)); }
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)); }