Exemple #1
0
 private static void OutResult(RedisResponse result)
 {
     if (result.ResponseType == ResponseType.Error)
     {
         Console.WriteLine(result.AsError());
     }
     else if (result.ResponseType == ResponseType.Status)
     {
         Console.WriteLine(result.AsStatus());
     }
     else if (result.ResponseType == ResponseType.Integer)
     {
         Console.WriteLine(result.AsInteger());
     }
     else if (result.ResponseType == ResponseType.Bulk)
     {
         Console.WriteLine(result.AsBulk().As <string>());
     }
     else if (result.ResponseType == ResponseType.MultiBulk)
     {
         var mb = result.AsMultiBulk();
         foreach (var r in mb)
         {
             Console.WriteLine(r.As <string>());
         }
     }
 }
Exemple #2
0
		private static void OutResult(RedisResponse result)
		{
			if (result.ResponseType == ResponseType.Error)
				Console.WriteLine(result.AsError());
			else if (result.ResponseType == ResponseType.Status)
				Console.WriteLine(result.AsStatus());
			else if (result.ResponseType == ResponseType.Integer)
				Console.WriteLine(result.AsInteger());
			else if (result.ResponseType == ResponseType.Bulk)
				Console.WriteLine(result.AsBulk().As<string>());
			else if (result.ResponseType == ResponseType.MultiBulk)
			{
				var mb = result.AsMultiBulk();
				foreach (var r in mb)
				{
					Console.WriteLine(r.As<string>());
				}
			}
		}