public void UpdateCookie(string aName, string aValue, CookieAttributes aAttributes) { throw new NotImplementedException(); }
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; }
public void SetCookie(string aName, string aValue, CookieAttributes aAttributes) { iAppsStateThread.ScheduleExclusive( () => { iEventQueue.UpdateCookie(aName, aValue, aAttributes); }); }
public void SetCookie(string aName, string aValue, CookieAttributes aAttributes) { ServerTab.Send( "set-cookie", new JsonString(FormatCookie(aName, aValue, aAttributes))); }