Exemplo n.º 1
0
        protected CachedCookie Add(string cookieName)
        {
            var cookie = new CachedCookie
            {
                Name = cookieName
            };

            _pendingCookies.Add(cookieName, cookie);

            return(cookie);
        }
Exemplo n.º 2
0
        protected CachedCookie Delete(string cookieName)
        {
            if (_pendingCookies.TryGetValue(cookieName, out CachedCookie cookie))
            {
                cookie.IsDeleted = true;
            }
            else
            {
                cookie = new CachedCookie
                {
                    Name      = cookieName,
                    IsDeleted = true
                };
                _pendingCookies.Add(cookieName, cookie);
            }

            return(cookie);
        }