ServiceStack.Redis.RedisNativeClient.Incr C# (CSharp) Method

Incr() public method

public Incr ( string key ) : long
key string
return long
        public long Incr(string key)
        {
            if (key == null)
                throw new ArgumentNullException("key");

            return SendExpectLong(Commands.Incr, key.ToUtf8Bytes());
        }

Usage Example

Exemplo n.º 1
0
 public static void RedisIncrement()
 {
     using (IRedisNativeClient nrc = new RedisNativeClient())
     {
         nrc.Del("Increment");
         for (int i = 0; i < iterations; i++)
         {
             nrc.Incr("Increment");
         }
     }
 }
RedisNativeClient