blob: 4058b9fd67e4c59ecfe386fbfd9ddef85d29e8f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
//
// System.Net.CookieContainer
//
// Author:
// Lawrence Pit (loz@cable.a2000.nl)
//
using System;
using System.Collections;
using System.Runtime.Serialization;
namespace System.Net
{
[Serializable]
public class CookieContainer
{
private int count;
private int capacity;
private int perDomainCapacity;
private int maxCookieSize;
// ctors
public CookieContainer () : this (DefaultCookieLimit)
{
}
public CookieContainer (int capacity) :
this (capacity, DefaultPerDomainCookieLimit, DefaultCookieLengthLimit)
{
}
public CookieContainer (int capacity, int perDomainCapacity, int maxCookieSize)
{
this.capacity = capacity;
this.perDomainCapacity = perDomainCapacity;
this.maxCookieSize = maxCookieSize;
this.count = 0;
}
// fields
public const int DefaultCookieLengthLimit = 4096;
public const int DefaultCookieLimit = 300;
public const int DefaultPerDomainCookieLimit = 20;
// properties
public int Count {
get { return count; }
}
public int Capacity {
get { return capacity; }
set {
if ((value <= 0) ||
(value < perDomainCapacity && perDomainCapacity != Int32.MaxValue))
throw new ArgumentOutOfRangeException ("value");
if (value < maxCookieSize)
maxCookieSize = value;
capacity = value;
}
}
public int MaxCookieSize {
get { return maxCookieSize; }
set {
if (value <= 0)
throw new ArgumentOutOfRangeException ("value");
maxCookieSize = value;
}
}
public int PerDomainCapacity {
get { return perDomainCapacity; }
set {
if ((value <= 0) ||
(value > DefaultCookieLimit && value != Int32.MaxValue))
throw new ArgumentOutOfRangeException ("value");
if (value < perDomainCapacity)
perDomainCapacity = value;
perDomainCapacity = value;
}
}
[MonoTODO]
public void Add (Cookie cookie)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Add (CookieCollection cookies)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Add (Uri uri, Cookie cookie)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Add (Uri uri, CookieCollection cookies)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetCookieHeader (Uri uri)
{
throw new NotImplementedException ();
}
[MonoTODO]
public CookieCollection GetCookies (Uri uri)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetCookies (Uri uri, string cookieHeader)
{
throw new NotImplementedException ();
}
} // CookieContainer
} // System.Net
|