public AzureTableSagaRepositoryContextFactory(Func <CloudTable> databaseFactory, ISagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga> factory) { _databaseFactory = databaseFactory; _factory = factory; _keyFormatter = new ConstantSagaKeyFormatter <TSaga>(typeof(TSaga).Name); }
public AzureTableDatabaseContext(CloudTable table, ISagaKeyFormatter <TSaga> keyFormatter) { Table = table; Formatter = keyFormatter; Converter = EntityConverterFactory.CreateConverter <TSaga>(); }
public static ISagaRepository <TSaga> Create(Func <CloudTable> tableFactory, ISagaKeyFormatter <TSaga> keyFormatter) { var consumeContextFactory = new SagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga>(); var repositoryContextFactory = new AzureTableSagaRepositoryContextFactory <TSaga>(tableFactory, consumeContextFactory, keyFormatter); return(new SagaRepository <TSaga>(repositoryContextFactory)); }
public AzureTableSagaRepositoryContextFactory(ICloudTableProvider <TSaga> cloudTableProvider, ISagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga> factory, ISagaKeyFormatter <TSaga> keyFormatter) { _cloudTableProvider = cloudTableProvider; _factory = factory; _keyFormatter = keyFormatter; }
public AzureTableSagaRepositoryContextFactory(Func <CloudTable> databaseFactory, ISagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga> factory, ISagaKeyFormatter <TSaga> keyFormatter) { _databaseFactory = databaseFactory; _factory = factory; _keyFormatter = keyFormatter; }
public static void UseAzureTableSagaRepository(this IJobServiceConfigurator configurator, Func <CloudTable> contextFactory, ISagaKeyFormatter <JobTypeSaga> jobTypeKeyFormatter, ISagaKeyFormatter <JobSaga> jobKeyFormatter, ISagaKeyFormatter <JobAttemptSaga> jobAttemptKeyFormatter) { configurator.Repository = AzureTableSagaRepository <JobTypeSaga> .Create(contextFactory, jobTypeKeyFormatter); configurator.JobRepository = AzureTableSagaRepository <JobSaga> .Create(contextFactory, jobKeyFormatter); configurator.JobAttemptRepository = AzureTableSagaRepository <JobAttemptSaga> .Create(contextFactory, jobAttemptKeyFormatter); }
public AzureTableDatabaseContext(CloudTable table, ISagaKeyFormatter <TSaga> keyFormatter) { Table = table; Formatter = keyFormatter; }
public AzureTableSagaRepositoryContextFactory(CloudTable cloudTable, ISagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga> factory, ISagaKeyFormatter <TSaga> keyFormatter) : this(new ConstCloudTableProvider <TSaga>(cloudTable), factory, keyFormatter) { }
public AzureTableSagaRepositoryContextFactory(CloudTable databaseFactory, ISagaConsumeContextFactory <DatabaseContext <TSaga>, TSaga> factory, ISagaKeyFormatter <TSaga> keyFormatter) : this(() => databaseFactory, factory, keyFormatter) { }