예제 #1
0
            public async Task Delete(GrainStateRecord record)
            {
                var entity = record.Entity;

                if (logger.IsEnabled(LogLevel.Trace))
                {
                    logger.Trace((int)AzureProviderErrorCode.AzureTableProvider_Storage_Writing, "Deleting: PartitionKey={0} RowKey={1} from Table={2} with ETag={3}", entity.PartitionKey, entity.RowKey, TableName, record.ETag);
                }
                await tableManager.DeleteTableEntryAsync(entity, record.ETag).ConfigureAwait(false);

                record.ETag = null;
            }
예제 #2
0
            public async Task Delete(GrainStateRecord record)
            {
                GrainStateEntity entity = record.Entity;

                if (logger.IsVerbose3)
                {
                    logger.Verbose3((int)AzureProviderErrorCode.AzureTableProvider_Storage_Writing, "Deleting: PartitionKey={0} RowKey={1} from Table={2} with ETag={3}", entity.PartitionKey, entity.RowKey, TableName, record.ETag);
                }
                await tableManager.DeleteTableEntryAsync(entity, record.ETag);

                record.ETag = null;
            }
예제 #3
0
 /// <summary>
 /// Try once to delete a data entry in the Azure table. Returns false if there is a conflict.
 /// </summary>
 private async Task <bool> TryDeleteTableEntryAsync(GossipTableEntry data, string etag, [CallerMemberName] string operation = null)
 {
     return(await TryOperation(() => storage.DeleteTableEntryAsync(data, etag), operation));
 }