2 // System.Net.CookieContainer
\r
5 // Lawrence Pit (loz@cable.a2000.nl)
\r
9 using System.Collections;
\r
10 using System.Runtime.Serialization;
\r
12 namespace System.Net
\r
15 public class CookieContainer
\r
18 private int capacity;
\r
19 private int perDomainCapacity;
\r
20 private int maxCookieSize;
\r
23 public CookieContainer () : this (DefaultCookieLimit)
\r
27 public CookieContainer (int capacity) :
\r
28 this (capacity, DefaultPerDomainCookieLimit, DefaultCookieLengthLimit)
\r
32 public CookieContainer (int capacity, int perDomainCapacity, int maxCookieSize)
\r
34 this.capacity = capacity;
\r
35 this.perDomainCapacity = perDomainCapacity;
\r
36 this.maxCookieSize = maxCookieSize;
\r
42 public const int DefaultCookieLengthLimit = 4096;
\r
43 public const int DefaultCookieLimit = 300;
\r
44 public const int DefaultPerDomainCookieLimit = 20;
\r
49 get { return count; }
\r
52 public int Capacity {
\r
53 get { return capacity; }
\r
56 (value < perDomainCapacity && perDomainCapacity != Int32.MaxValue))
\r
57 throw new ArgumentOutOfRangeException ("value");
\r
58 if (value < maxCookieSize)
\r
59 maxCookieSize = value;
\r
64 public int MaxCookieSize {
\r
65 get { return maxCookieSize; }
\r
68 throw new ArgumentOutOfRangeException ("value");
\r
69 maxCookieSize = value;
\r
73 public int PerDomainCapacity {
\r
74 get { return perDomainCapacity; }
\r
77 (value > DefaultCookieLimit && value != Int32.MaxValue))
\r
78 throw new ArgumentOutOfRangeException ("value");
\r
79 if (value < perDomainCapacity)
\r
80 perDomainCapacity = value;
\r
81 perDomainCapacity = value;
\r
86 public void Add (Cookie cookie)
\r
88 throw new NotImplementedException ();
\r
92 public void Add (CookieCollection cookies)
\r
94 throw new NotImplementedException ();
\r
98 public void Add (Uri uri, Cookie cookie)
\r
100 throw new NotImplementedException ();
\r
104 public void Add (Uri uri, CookieCollection cookies)
\r
106 throw new NotImplementedException ();
\r
110 public string GetCookieHeader (Uri uri)
\r
112 throw new NotImplementedException ();
\r
116 public CookieCollection GetCookies (Uri uri)
\r
118 throw new NotImplementedException ();
\r
122 public void SetCookies (Uri uri, string cookieHeader)
\r
124 throw new NotImplementedException ();
\r
127 } // CookieContainer
\r