Exemple #1
0
        public T Retrieve <T>()
        {
            if (!_cookies.Has(FlashKey))
            {
                return(default(T));
            }

            var json = _cookies.GetValue(FlashKey);

            json = FromBase64String(HttpUtility.UrlDecode(json));

            var cookie = new Cookie(FlashKey)
            {
                Path    = "/",
                Expires = _systemTime.UtcNow().AddYears(-1)
            };

            _writer.AppendCookie(cookie);

            return(JsonUtil.Get <T>(json));
        }