Exemplo n.º 1
0
        protected virtual IEnumerable <T> Combine <T>(StackExchange.Redis.SetOperation setOperation, string firstKey, string secondKey)
        {
            var results = Core.SetCombine(setOperation, firstKey, secondKey);

            if (results != null && results.Any())
            {
                List <T> modResults = new List <T>();

                foreach (var item in results)
                {
                    try
                    {
                        modResults.Add(JsonConvert.DeserializeObject <T>(item));
                    }
                    catch
                    {
                        continue;
                    }
                }

                return(modResults);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 protected virtual IEnumerable <string> Combine(StackExchange.Redis.SetOperation setOperation, string firstKey, string secondKey)
 {
     return(Combine <string>(setOperation, firstKey, secondKey));
 }