/// <summary> /// Initializes a new instance of the <see cref="AzureTableCommandStore"/> class. /// </summary> /// <param name="storeConnectionString">Storage Connection string.</param> public AzureTableCommandStore(string storeConnectionString) { var client = CloudStorageAccount .Parse(storeConnectionString) .CreateCloudTableClient(); var commandTableReference = client.GetTableReference(nameof(CommandStore)); tableProxy = new CloudTableProxy(commandTableReference, ensureTableExists: true); }
/// <summary> /// Initializes a new instance of the <see cref="TransactionStore"/> class. /// </summary> /// <param name="connectionString">Connection string to storage account.</param> public TransactionStore(string connectionString) { var client = CloudStorageAccount .Parse(connectionString) .CreateCloudTableClient(); var tableReference = client.GetTableReference(nameof(TransactionStore)); tableProxy = new CloudTableProxy(tableReference, ensureTableExists: true); }
/// <summary> /// Initializes a new instance of the <see cref="ProcessStore{TProcessHandler}"/> class. /// </summary> /// <param name="options">Table store option.</param> public ProcessStore(IOptionsMonitor <TableStorageOptions> options) { var client = CloudStorageAccount .Parse(options.CurrentValue.ConnectionString) .CreateCloudTableClient(); var tableName = options.CurrentValue.TableNamePrefix + typeof(TProcessHandler).Name; var tableReference = client.GetTableReference(tableName); tableProxy = new CloudTableProxy(tableReference, ensureTableExists: true); }
/// <summary> /// Initializes a new instance of the <see cref="BaseTableStorage{TTableEntity}"/> class. /// </summary> /// <param name="options">Value for <see cref="Options"/>.</param> /// <param name="tableSuffix">Table name suffix. Along with prefix is used to build table name.</param> protected BaseTableStorage(IOptionsMonitor <TableStorageOptions> options, string tableSuffix) { this.Options = options; var client = CloudStorageAccount .Parse(options.CurrentValue.ConnectionString) .CreateCloudTableClient(); var tableName = options.CurrentValue.TableNamePrefix + tableSuffix; var tableReference = client.GetTableReference(tableName); TableProxy = new CloudTableProxy(tableReference, ensureTableExists: true); }