8 [global::__DynamicallyInvokable]
19 private class CookieCollectionEnumerator :
IEnumerator 25 private int m_index = -1;
27 private int m_version;
33 if (m_index < 0 || m_index >= m_count)
37 if (m_version != m_cookies.m_version)
41 return m_cookies[m_index];
48 m_count = cookies.
Count;
49 m_version = cookies.m_version;
54 if (m_version != m_cookies.m_version)
58 if (++m_index < m_count)
72 internal int m_version;
78 private bool m_has_other_versions;
81 private bool m_IsReadOnly;
93 public Cookie this[
int index]
97 if (index < 0 || index >= m_list.
Count)
101 return (
Cookie)m_list[index];
110 [global::__DynamicallyInvokable]
111 public Cookie this[
string name]
113 [global::__DynamicallyInvokable]
116 foreach (
Cookie item
in m_list)
118 if (
string.Compare(item.Name, name,
StringComparison.OrdinalIgnoreCase) == 0)
129 [global::__DynamicallyInvokable]
132 [global::__DynamicallyInvokable]
148 internal bool IsOtherVersionSeen => m_has_other_versions;
151 [global::__DynamicallyInvokable]
166 [global::__DynamicallyInvokable]
174 int num = IndexOf(cookie);
181 m_list[num] = cookie;
189 [global::__DynamicallyInvokable]
196 foreach (
Cookie cooky
in cookies)
214 m_list.
CopyTo(array, index);
229 m_list.
CopyTo(array, index);
232 internal DateTime TimeStamp(Stamp how)
239 case Stamp.SetToMaxUsed:
242 case Stamp.SetToUnused:
249 internal int InternalAdd(
Cookie cookie,
bool isStrict)
256 foreach (
Cookie item
in m_list)
258 if (comparer.
Compare(cookie, item) == 0)
261 if (item.Variant <= cookie.Variant)
263 m_list[num] = cookie;
269 if (num == m_list.Count)
278 if (cookie.Version != 1)
280 m_has_other_versions =
true;
285 internal int IndexOf(
Cookie cookie)
289 foreach (
Cookie item
in m_list)
291 if (comparer.
Compare(cookie, item) == 0)
300 internal void RemoveAt(
int idx)
302 m_list.RemoveAt(idx);
307 [global::__DynamicallyInvokable]
310 return new CookieCollectionEnumerator(
this);
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
int Count
Gets the number of cookies contained in a T:System.Net.CookieCollection.
void Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
The Cookie header, which specifies cookie data presented to the server.
bool MoveNext()
Advances the enumerator to the next element of the collection.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
static readonly DateTime MinValue
Represents the smallest possible value of T:System.DateTime. This field is read-only.
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
Provides a collection container for instances of the T:System.Net.Cookie class.
The exception that is thrown when the value of an argument is outside the allowable range of values a...
void CopyTo(Array array, int index)
Copies the elements of a T:System.Net.CookieCollection to an instance of the T:System....
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
CookieCollection()
Initializes a new instance of the T:System.Net.CookieCollection class.
int Compare(object x, object y)
Compares two objects and returns a value indicating whether one is less than, equal to,...
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
bool IsSynchronized
Gets a value that indicates whether access to a T:System.Net.CookieCollection is thread safe.
static readonly DateTime MaxValue
Represents the largest possible value of T:System.DateTime. This field is read-only.
object Current
Gets the element in the collection at the current position of the enumerator.
Exposes a method that compares two objects.
bool IsReadOnly
Gets a value that indicates whether a T:System.Net.CookieCollection is read-only.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
void Add(Cookie cookie)
Adds a T:System.Net.Cookie to a T:System.Net.CookieCollection.
void CopyTo(Cookie[] array, int index)
Copies the elements of this T:System.Net.CookieCollection to a T:System.Net.Cookie array starting at ...
virtual void CopyTo(Array array)
Copies the entire T:System.Collections.ArrayList to a compatible one-dimensional T:System....
virtual int Add(object value)
Adds an object to the end of the T:System.Collections.ArrayList.
void Add(CookieCollection cookies)
Adds the contents of a T:System.Net.CookieCollection to the current instance.
Specifies that the class can be serialized.
static DateTime Now
Gets a T:System.DateTime object that is set to the current date and time on this computer,...
The exception that is thrown when a method call is invalid for the object's current state.
IEnumerator GetEnumerator()
Gets an enumerator that can iterate through a T:System.Net.CookieCollection.
Provides a set of properties and methods that are used to manage cookies. This class cannot be inheri...
Defines size, enumerators, and synchronization methods for all nongeneric collections.
Supports a simple iteration over a non-generic collection.
object SyncRoot
Gets an object to synchronize access to the T:System.Net.CookieCollection.
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...