Exemplo n.º 1
0
 /// <summary>s
 /// Decrement the specified field of an hash stored at key, and representing a floating point number, by the specified decrement. If the field does not exist, it is set to 0 before performing the operation.
 /// </summary>
 /// <param name="hashField">The field in the hash to decrement.</param>
 /// <param name="value">The amount to decrement by.</param>
 /// <returns>The value at field after the decrement operation.</returns>
 /// <remarks>The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation.</remarks>
 /// <remarks>https://redis.io/commands/hincrbyfloat</remarks>
 public Task <double> DecrementAsync(string hashField, double value)
 {
     return(RedisDb.HashDecrementAsync(KeyName, hashField, value));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Decrements the number stored at field in the hash stored at key by decrement. If key does not exist, a new key holding a hash is created. If field does not exist or holds a string that cannot be interpreted as integer, the value is set to 0 before the operation is performed.
 /// </summary>
 /// <param name="hashField">The field in the hash to decrement.</param>
 /// <param name="value">The amount to decrement by.</param>
 /// <returns>The value at field after the decrement operation.</returns>
 /// <remarks>https://redis.io/commands/hincrby</remarks>
 public Task <long> DecrementAsync(string hashField, long value = 1)
 {
     return(RedisDb.HashDecrementAsync(KeyName, hashField, value));
 }