+ if (cookies == null)
+ cookies = new CookieCollection ();
+
+ if (count + 1 > capacity)
+ throw new CookieException ("Capacity exceeded");
+
+ cookies.Add (cookie);
+ count = cookies.Count;
+ CheckExpiration ();
+
+ }
+
+ // Only needs to be called from AddCookie (Cookie) and GetCookies (Uri)
+ void CheckExpiration ()
+ {
+ if (cookies == null)
+ return;