public static StrongCloudTableClient CreateClient(CloudStorageAccount saConnection) { var tableClient = new StrongCloudTableClient(saConnection.TableStorageUri, saConnection.Credentials); tableClient.DefaultRequestOptions = new TableRequestOptions { MaximumExecutionTime = TimeSpan.FromSeconds(15), ServerTimeout = TimeSpan.FromSeconds(10), }; return(tableClient); }
public CosmosTableStorage(StrongCloudTableClient tableClient, string tableName, bool ensureExists) { tableName_ = tableName; Table = tableClient.GetTableReference(tableName_); var exists = Table.ExistsAsync().Result; if (!exists) { if (ensureExists) { Table.CreateIfNotExistsAsync().Wait(); } else { throw new Exception($"table does not exist and creation not allowed. name:[{tableName}]"); } } }
public CosmosTableStorage(StrongCloudTableClient tableClient, string tableName) { tableName_ = tableName; Table = tableClient.GetTableReference(tableName_); }
public CosmosTypedTableStorage(StrongCloudTableClient tableClient, AzureContextOptions options, string name, bool createOnDemand) : base(tableClient, options.GetTableName(name), createOnDemand) { }
public CosmosTypedTableStorage(StrongCloudTableClient tableClient, AzureContextOptions options, string name) : base(tableClient, options.GetTableName(name)) { }
public CosmosTypedTableStorage(StrongCloudTableClient tableClient, AzureContextOptions options) : base(tableClient, options.GetTableName(typeof(Entry).Name)) { }