Example #1
0
 public static void SetCookies(this IWebHttpResponseCookie Cookie, string Name, IList <WebHttpCookieValue> Values)
 {
     if (Cookie.Exist(Name))
     {
         Cookie[Name] = Values;
     }
     else
     {
         Cookie.Add(Name, Values);
     }
 }
Example #2
0
 public static void SetCookie(this IWebHttpResponseCookie Cookie, string Name, WebHttpCookieValue Value)
 {
     if (Cookie.Exist(Name))
     {
         Cookie.Clear(false);
         var list = new List <WebHttpCookieValue>(1);
         list.Add(Value);
         Cookie[Name] = list;
     }
     else
     {
         Cookie.Add(Name, Value);
     }
 }