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

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

public static AddSecureCookie ( string key, string value, DateTime expiryDate ) : void
key string
value string
expiryDate DateTime
Результат void
        public static void AddSecureCookie(string key, string value, DateTime? expiryDate)
        {
        	DateTime ticketExpiryDate = expiryDate.HasValue ? expiryDate.Value : DateTime.Now.AddMinutes(10);
            FormsAuthenticationTicket formsAuthenticationTicket = new FormsAuthenticationTicket(1, key, DateTime.Now,
																								ticketExpiryDate, true, value);

            AddCookie(key, FormsAuthentication.Encrypt(formsAuthenticationTicket), expiryDate);
        }