Exemple #1
0
        public async Task <IEnumerable <SessionResult> > GetAllSessionsAsync()
        {
            var keys = await _redisManager.Keys(0, "*");

            var values = await _redisManager.StringGet(0, keys);

            return(values.Select <string, SessionResult>(s =>
            {
                string[] args = s.Split('|');
                return new SessionResult(args[0], args[1], DateTime.Parse(args[2]), DateTime.Parse(args[3]), args[4]);
            }));
        }