Пример #1
0
 public void UpdateCookie(string aName, string aValue, CookieAttributes aAttributes)
 {
     throw new NotImplementedException();
 }
Пример #2
0
 static string FormatCookie(string aName, string aValue, CookieAttributes aAttributes)
 {
     string expires, path, secure, httponly;
     if (aAttributes != null)
     {
         expires = aAttributes.Expires == null ? "" : aAttributes.Expires.Value.ToString(" ddd, d MMM yyyy HH:mm:ss UTC;");
         path = aAttributes.Path == null ? "" : (" path=" + aAttributes.Path + ";");
         secure = aAttributes.Secure ? " Secure;" : "";
         httponly = aAttributes.HttpOnly ? " HttpOnly;" : "";
     }
     else
     {
         expires = path = secure = httponly = "";
     }
     string formatted = String.Format("{0}={1};{2}{3}{4}{5}", aName, aValue, expires, path, secure, httponly);
     return formatted;
 }
Пример #3
0
 public void SetCookie(string aName, string aValue, CookieAttributes aAttributes)
 {
     iAppsStateThread.ScheduleExclusive(
         () =>
         {
             iEventQueue.UpdateCookie(aName, aValue, aAttributes);
         });
 }
Пример #4
0
 public void SetCookie(string aName, string aValue, CookieAttributes aAttributes)
 {
     ServerTab.Send(
         "set-cookie",
         new JsonString(FormatCookie(aName, aValue, aAttributes)));
 }