예제 #1
0
        /// <summary>
        /// Constructor that takes in only the storage account for access. It determines a default table name by using the given tableName property.
        /// </summary>
        public TableOperationsService(string connectionString, string tableName)
        {
            _encoder = new TableKeyEncoder();
            var storageAccount = CloudStorageAccount.Parse(connectionString);

            InitConstructor(storageAccount, tableName);
        }
예제 #2
0
 public EntityBatch(IEnumerable <TAzureTableEntity> entities, string operationName, TableKeyEncoder encoder)
 {
     _operationName  = operationName;
     EntitiesToBatch = new List <EntityBatchPair>();
     foreach (var azureTableEntity in entities)
     {
         azureTableEntity.PartitionKey = encoder.EncodeTableKey(azureTableEntity.PartitionKey);
         azureTableEntity.RowKey       = encoder.EncodeTableKey(azureTableEntity.RowKey);
         EntitiesToBatch.Add(new EntityBatchPair(azureTableEntity));
     }
     BatchList          = new List <TableBatchOperation>();
     BatchArrayByteSize = BatchBytesSize();
     GroupEntitiesIntoBatches();
 }
예제 #3
0
 /// <summary>
 /// Constructor that takes in only the storage account for access. It determines a default table name by using the given tableName property.
 /// </summary>
 /// <param name="storageAccount"></param>
 /// <param name="tableName"></param>
 public TableOperationsService(CloudStorageAccount storageAccount, string tableName)
 {
     _encoder = new TableKeyEncoder();
     InitConstructor(storageAccount, tableName);
 }