BB.Caching.Cache.Shared.Hashes.Increment C# (CSharp) Méthode

Increment() public static méthode

Increments the number stored at field in the hash stored at key by increment. 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.
The range of values supported by HINCRBY is limited to 64 bit signed integers. http://redis.io/commands/hincrby
public static Increment ( RedisKey key, RedisValue field, double value ) : Task
key RedisKey
field RedisValue
value double
Résultat Task
                public static Task<double> Increment(RedisKey key, RedisValue field, double value)
                {
                    var connections = SharedCache.Instance.GetWriteConnections(key);
                    Task<double> result = null;
                    foreach (var connection in connections)
                    {
                        Task<double> task = connection
                            .GetDatabase(SharedCache.Instance.Db)
                            .HashIncrementAsync(key, field, value);

                        if (null == result)
                            result = task;
                    }
                    return result;
                }

Same methods

Cache.Shared.Hashes::Increment ( RedisKey key, RedisValue field, int value = 1 ) : Task
Cache.Shared.Hashes::Increment ( RedisKey key, RedisValue field, double value ) : double
Cache.Shared.Hashes::Increment ( RedisKey key, RedisValue field, int value = 1 ) : long