Aqueduct.Web.CookieManager.AddCookie C# (CSharp) Метод

AddCookie() публичный статический Метод

public static AddCookie ( string key, string>.Dictionary values, System.DateTime expiryDate, string domain ) : void
key string
values string>.Dictionary
expiryDate System.DateTime
domain string
Результат void
        public static void AddCookie(string key, Dictionary<string,string> values, DateTime? expiryDate, string domain)
        {
            HttpCookie httpCookie = new HttpCookie(key);

            foreach (KeyValuePair<string, string> value in values)
                httpCookie.Values.Add(value.Key, value.Value);

            if (expiryDate.HasValue)
                httpCookie.Expires = expiryDate.Value;
            if (!String.IsNullOrEmpty(domain))
                httpCookie.Domain = domain;

            HttpContext.Current.Response.Cookies.Add(httpCookie);
        }

Same methods

CookieManager::AddCookie ( string key, string>.Dictionary values, System.DateTime expiryDate ) : void
CookieManager::AddCookie ( string key, string value, DateTime expiryDate ) : void
CookieManager::AddCookie ( string key, string value, DateTime expiryDate, string domain ) : void