Esempio n. 1
0
 public async Task WriteInProgressAsync(string resourceIndexableKey, string resourceType, CancellationToken cancellationToken = default(CancellationToken))
 {
     var status = new ResourceCreateStatusEntity
     {
         PartitionKey = this.requestId,
         RowKey       = resourceIndexableKey,
         //
         Type   = resourceType,
         Status = "InProgress",
     };
     TableOperation insertOrReplaceOperation = TableOperation.InsertOrReplace(status);
     await table.ExecuteAsync(insertOrReplaceOperation);
 }
Esempio n. 2
0
 public async Task WriteFailedAsync(string resourceIndexableKey, string resourceType, dynamic exception, CancellationToken cancellationToken = default(CancellationToken))
 {
     var status = new ResourceCreateStatusEntity
     {
         PartitionKey = this.requestId,
         RowKey       = resourceIndexableKey,
         //
         Type           = resourceType,
         Status         = "Failed",
         FailureMessage = JsonConvert.SerializeObject(exception, Formatting.Indented)
     };
     TableOperation insertOrReplaceOperation = TableOperation.InsertOrReplace(status);
     await table.ExecuteAsync(insertOrReplaceOperation);
 }