mscorlib(4.0.0.0) API with additions
System.Net.CookieCollection Class Reference

Provides a collection container for instances of the T:System.Net.Cookie class. More...

Inheritance diagram for System.Net.CookieCollection:
[legend]
Collaboration diagram for System.Net.CookieCollection:
[legend]

Public Member Functions

 CookieCollection ()
 Initializes a new instance of the T:System.Net.CookieCollection class. More...
 
void Add (Cookie cookie)
 Adds a T:System.Net.Cookie to a T:System.Net.CookieCollection. More...
 
void Add (CookieCollection cookies)
 Adds the contents of a T:System.Net.CookieCollection to the current instance. More...
 
void CopyTo (Array array, int index)
 Copies the elements of a T:System.Net.CookieCollection to an instance of the T:System.Array class, starting at a particular index. More...
 
void CopyTo (Cookie[] array, int index)
 Copies the elements of this T:System.Net.CookieCollection to a T:System.Net.Cookie array starting at the specified index of the target array. More...
 
IEnumerator GetEnumerator ()
 Gets an enumerator that can iterate through a T:System.Net.CookieCollection. More...
 

Public Attributes

bool IsReadOnly => m_IsReadOnly
 Gets a value that indicates whether a T:System.Net.CookieCollection is read-only. More...
 
bool IsSynchronized => false
 Gets a value that indicates whether access to a T:System.Net.CookieCollection is thread safe. More...
 
object SyncRoot => this
 Gets an object to synchronize access to the T:System.Net.CookieCollection. More...
 

Properties

Cookie this[int index] [get]
 Gets the T:System.Net.Cookie with a specific index from a T:System.Net.CookieCollection. More...
 
Cookie this[string name] [get]
 Gets the T:System.Net.Cookie with a specific name from a T:System.Net.CookieCollection. More...
 
int Count [get]
 Gets the number of cookies contained in a T:System.Net.CookieCollection. More...
 
- Properties inherited from System.Collections.ICollection
int Count [get]
 Gets the number of elements contained in the T:System.Collections.ICollection. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the T:System.Collections.ICollection. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe). More...
 

Detailed Description

Provides a collection container for instances of the T:System.Net.Cookie class.

Definition at line 9 of file CookieCollection.cs.

Constructor & Destructor Documentation

◆ CookieCollection()

System.Net.CookieCollection.CookieCollection ( )

Initializes a new instance of the T:System.Net.CookieCollection class.

Definition at line 152 of file CookieCollection.cs.

Member Function Documentation

◆ Add() [1/2]

void System.Net.CookieCollection.Add ( Cookie  cookie)

Adds a T:System.Net.Cookie to a T:System.Net.CookieCollection.

Parameters
cookieThe T:System.Net.Cookie to be added to a T:System.Net.CookieCollection.
Exceptions
T:System.ArgumentNullExceptioncookie is null.

Definition at line 167 of file CookieCollection.cs.

◆ Add() [2/2]

void System.Net.CookieCollection.Add ( CookieCollection  cookies)

Adds the contents of a T:System.Net.CookieCollection to the current instance.

Parameters
cookiesThe T:System.Net.CookieCollection to be added.
Exceptions
T:System.ArgumentNullExceptioncookies is null.

Definition at line 190 of file CookieCollection.cs.

◆ CopyTo() [1/2]

void System.Net.CookieCollection.CopyTo ( Array  array,
int  index 
)

Copies the elements of a T:System.Net.CookieCollection to an instance of the T:System.Array class, starting at a particular index.

Parameters
arrayThe target T:System.Array to which the T:System.Net.CookieCollection will be copied.
indexThe zero-based index in the target T:System.Array where copying begins.
Exceptions
T:System.ArgumentNullExceptionarray is null.
T:System.ArgumentOutOfRangeExceptionindex is less than zero.
T:System.ArgumentExceptionarray is multidimensional.-or- The number of elements in this T:System.Net.CookieCollection is greater than the available space from index to the end of the destination array .
T:System.InvalidCastExceptionThe elements in this T:System.Net.CookieCollection cannot be cast automatically to the type of the destination array .

Implements System.Collections.ICollection.

Definition at line 212 of file CookieCollection.cs.

◆ CopyTo() [2/2]

void System.Net.CookieCollection.CopyTo ( Cookie []  array,
int  index 
)

Copies the elements of this T:System.Net.CookieCollection to a T:System.Net.Cookie array starting at the specified index of the target array.

Parameters
arrayThe target T:System.Net.Cookie array to which the T:System.Net.CookieCollection will be copied.
indexThe zero-based index in the target T:System.Array where copying begins.
Exceptions
T:System.ArgumentNullExceptionarray is null.
T:System.ArgumentOutOfRangeExceptionindex is less than zero.
T:System.ArgumentExceptionarray is multidimensional.-or- The number of elements in this T:System.Net.CookieCollection is greater than the available space from index to the end of the destination array .
T:System.InvalidCastExceptionThe elements in this T:System.Net.CookieCollection cannot be cast automatically to the type of the destination array .

Definition at line 227 of file CookieCollection.cs.

◆ GetEnumerator()

IEnumerator System.Net.CookieCollection.GetEnumerator ( )

Gets an enumerator that can iterate through a T:System.Net.CookieCollection.

Returns
An instance of an implementation of an T:System.Collections.IEnumerator interface that can iterate through a T:System.Net.CookieCollection.

Implements System.Collections.IEnumerable.

Definition at line 308 of file CookieCollection.cs.

Member Data Documentation

◆ IsReadOnly

bool System.Net.CookieCollection.IsReadOnly => m_IsReadOnly

Gets a value that indicates whether a T:System.Net.CookieCollection is read-only.

Returns
true if this is a read-only T:System.Net.CookieCollection; otherwise, false. The default is true.

Definition at line 86 of file CookieCollection.cs.

◆ IsSynchronized

bool System.Net.CookieCollection.IsSynchronized => false

Gets a value that indicates whether access to a T:System.Net.CookieCollection is thread safe.

Returns
true if access to the T:System.Net.CookieCollection is thread safe; otherwise, false. The default is false.

Definition at line 142 of file CookieCollection.cs.

◆ SyncRoot

object System.Net.CookieCollection.SyncRoot => this

Gets an object to synchronize access to the T:System.Net.CookieCollection.

Returns
An object to synchronize access to the T:System.Net.CookieCollection.

Definition at line 146 of file CookieCollection.cs.

Property Documentation

◆ Count

int System.Net.CookieCollection.Count
get

Gets the number of cookies contained in a T:System.Net.CookieCollection.

Returns
The number of cookies contained in a T:System.Net.CookieCollection.

Definition at line 131 of file CookieCollection.cs.

◆ this[int index]

Cookie System.Net.CookieCollection.this[int index]
get

Gets the T:System.Net.Cookie with a specific index from a T:System.Net.CookieCollection.

Parameters
indexThe zero-based index of the T:System.Net.Cookie to be found.
Returns
A T:System.Net.Cookie with a specific index from a T:System.Net.CookieCollection.
Exceptions
T:System.ArgumentOutOfRangeExceptionindex is less than 0 or index is greater than or equal to P:System.Net.CookieCollection.Count.

Definition at line 94 of file CookieCollection.cs.

◆ this[string name]

Cookie System.Net.CookieCollection.this[string name]
get

Gets the T:System.Net.Cookie with a specific name from a T:System.Net.CookieCollection.

Parameters
nameThe name of the T:System.Net.Cookie to be found.
Returns
The T:System.Net.Cookie with a specific name from a T:System.Net.CookieCollection.
Exceptions
T:System.ArgumentNullExceptionname is null.

Definition at line 112 of file CookieCollection.cs.


The documentation for this class was generated from the following file: