Beispiel #1
0
 private CloudTableClient GetCloudTableCreationClient()
 {
     try
     {
         CloudStorageAccount storageAccount = AzureStorageUtils.GetCloudStorageAccount(ConnectionString);
         CloudTableClient    creationClient = storageAccount.CreateCloudTableClient();
         creationClient.DefaultRequestOptions.RetryPolicy   = AzureTableDefaultPolicies.TableCreationRetryPolicy;
         creationClient.DefaultRequestOptions.ServerTimeout = AzureTableDefaultPolicies.TableCreationTimeout;
         // Values supported can be AtomPub, Json, JsonFullMetadata or JsonNoMetadata with Json being the default value
         creationClient.DefaultRequestOptions.PayloadFormat = TablePayloadFormat.JsonNoMetadata;
         return(creationClient);
     }
     catch (Exception exc)
     {
         Logger.Error((int)Utilities.ErrorCode.AzureTable_18, "Error creating CloudTableCreationClient.", exc);
         throw;
     }
 }