예제 #1
0
 /// <summary>
 /// Replace operation on count table
 /// </summary>
 /// <param name="table">Count table</param>
 /// <param name="partitionKey">Partition key</param>
 /// <param name="countKey">Key for entity</param>
 /// <param name="entity">Count entity</param>
 /// <returns>Table operation</returns>
 public static Operation Replace(CountTable table, string partitionKey, string countKey, CountEntity entity)
 {
     ValidateCountTableParameters(table, partitionKey, countKey, entity);
     return(new Operation()
     {
         Table = table,
         OperationType = OperationType.Replace,
         PartitionKey = partitionKey,
         Key = countKey,
         Entity = entity.Clone()
     });
 }
예제 #2
0
 /// <summary>
 /// Delete operation on count table
 /// </summary>
 /// <param name="table">Count table</param>
 /// <param name="partitionKey">Partition key for entity</param>
 /// <param name="countKey">Key for entity</param>
 /// <param name="entity">Count entity</param>
 /// <returns>Table operation</returns>
 public static Operation Delete(CountTable table, string partitionKey, string countKey, CountEntity entity = null)
 {
     ValidateCountTableParameters(table, partitionKey, countKey);
     return(new Operation()
     {
         Table = table,
         OperationType = OperationType.Delete,
         PartitionKey = partitionKey,
         Key = countKey,
         Entity = entity != null?entity.Clone() : null
     });
 }