示例#1
0
        public static RedisText ToRedisText(this RedisData data)
        {
            var to = new RedisText();

            if (data.Data != null)
            {
                to.Text = data.Data.FromUtf8Bytes();
            }

            if (data.Children != null)
            {
                to.Children = data.Children.ConvertAll(x => x.ToRedisText());
            }

            return(to);
        }
示例#2
0
 public static List <T> GetResults <T>(this RedisText from)
 => from.Children == null
        ? new List <T>()
        : from.Children.ConvertAll(x => x.Text.FromJson <T>());
示例#3
0
 public static List <string> GetResults(this RedisText from)
 => from.Children == null
        ? new List <string>()
        : from.Children.ConvertAll(x => x.Text);
示例#4
0
 public static T GetResult <T>(this RedisText from) => from.Text.FromJson <T>();
示例#5
0
 public static string GetResult(this RedisText from) => from.Text;
示例#6
0
        public static String ToJsonInfo(this RedisText redisText)
        {
            var source = redisText.GetResult();

            return(Parse(source));
        }
示例#7
0
 public static T GetResult <T>(this RedisText from)
 {
     return(from.Text.FromJson <T>());
 }
示例#8
0
 public static string GetResult(this RedisText from)
 {
     return(from.Text);
 }