C# Class TableStorage.AdvancedSamples

ファイルを表示 Open project: Azure-Samples/storage-table-dotnet-getting-started Class Usage Examples

Public Methods

Method Description
RunSamples ( ) : System.Threading.Tasks.Task

Private Methods

Method Description
AdvancedDataOperationsAsync ( Microsoft.WindowsAzure.Storage.Table.CloudTable table ) : System.Threading.Tasks.Task

Demonstrate advanced table functionality including batch operations and segmented queries

BatchInsertOfCustomerEntitiesAsync ( Microsoft.WindowsAzure.Storage.Table.CloudTable table ) : System.Threading.Tasks.Task

Demonstrate inserting of a large batch of entities. Some considerations for batch operations: 1. You can perform updates, deletes, and inserts in the same single batch operation. 2. A single batch operation can include up to 100 entities. 3. All entities in a single batch operation must have the same partition key. 4. While it is possible to perform a query as a batch operation, it must be the only operation in the batch. 5. Batch size must be less than or equal to 4 MB

CorsSample ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient ) : System.Threading.Tasks.Task

Query the Cross-Origin Resource Sharing (CORS) rules for the Table service

ExecuteSimpleQuery ( Microsoft.WindowsAzure.Storage.Table.CloudTable table, string partitionKey, string startRowKey, string endRowKey ) : void

Demonstrate a partition range query that searches within a partition for a set of entities that are within a specific range. This query returns all entities in the range. Note that if your table contains a large amount of data, the query may be slow or may time out. In that case, use a segmented query, as shown in the PartitionRangeQueryAsync() sample method. Note that the ExecuteSimpleQuery method is called synchronously, for the purposes of the sample. However, in a real-world application using the async/await pattern, best practices recommend using asynchronous methods consistently.

ListAllTables ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient ) : void

Lists all tables in the storage account.

ListTablesWithPrefix ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient, string prefix ) : System.Threading.Tasks.Task

Lists tables in the storage account whose names begin with the specified prefix.

PartitionRangeQueryAsync ( Microsoft.WindowsAzure.Storage.Table.CloudTable table, string partitionKey, string startRowKey, string endRowKey ) : System.Threading.Tasks.Task

Demonstrate a partition range query that searches within a partition for a set of entities that are within a specific range. The async APIs require that the user handle the segment size and return the next segment using continuation tokens.

PartitionScanAsync ( Microsoft.WindowsAzure.Storage.Table.CloudTable table, string partitionKey ) : System.Threading.Tasks.Task

Demonstrate a partition scan whereby we are searching for all the entities within a partition. Note this is not as efficient as a range scan - but definitely more efficient than a full table scan. The async APIs require that the user handle the segment size and return the next segment using continuation tokens.

ServicePropertiesSample ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient ) : System.Threading.Tasks.Task

Manage the properties of the Table service.

ServiceStatsSample ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient ) : System.Threading.Tasks.Task

Retrieve statistics related to replication for the Table service

TableAclSample ( Microsoft.WindowsAzure.Storage.Table.CloudTable table ) : System.Threading.Tasks.Task

Manage stored access policies specified on the table

TableListingOperations ( Microsoft.WindowsAzure.Storage.Table.CloudTableClient tableClient ) : System.Threading.Tasks.Task

List tables in the storage account.

Method Details

RunSamples() public method

public RunSamples ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task