websocket-sharp : WebSocketSharp.Net Namespace

# CookieCollection Class

Provides a collection container for instances of the WebSocketSharp.Net.Cookie class.

## Syntax

public class CookieCollection : ICollection

## Remarks

Documentation for this section has not yet been entered.

## Requirements

Namespace: WebSocketSharp.Net
Assembly: websocket-sharp (in websocket-sharp.dll)

## Members

See Also: Inherited members from object.

## Public Constructors

| CookieCollection () | Initializes a new instance of the WebSocketSharp.Net.CookieCollection class.

## Public Properties

[read-only] | Count | int . Gets the number of cookies contained in the WebSocketSharp.Net.CookieCollection.
[read-only] | IsReadOnly | bool . Gets a value indicating whether the WebSocketSharp.Net.CookieCollection is read-only.
[read-only] | IsSynchronized | bool . Gets a value indicating whether access to the WebSocketSharp.Net.CookieCollection is thread safe.
[read-only] default property | Item (int) | Cookie . Gets the WebSocketSharp.Net.Cookie with the specified index from the WebSocketSharp.Net.CookieCollection.
[read-only] default property | Item (string) | Cookie . Gets the WebSocketSharp.Net.Cookie with the specified name from the WebSocketSharp.Net.CookieCollection.
[read-only] | SyncRoot | object . Gets an object to use to synchronize access to the WebSocketSharp.Net.CookieCollection.

## Public Methods

| Add (Cookie) Add the specified WebSocketSharp.Net.Cookie to the WebSocketSharp.Net.CookieCollection.
| Add (CookieCollection) Add the elements of the specified WebSocketSharp.Net.CookieCollection to the current WebSocketSharp.Net.CookieCollection.
| CopyTo (Array, int) Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified Array, starting at the specified index in the array.
| CopyTo (Cookie[], int) Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified array of WebSocketSharp.Net.Cookie, starting at the specified index in the array.
| GetEnumerator () : IEnumerator Gets the enumerator to use to iterate through the WebSocketSharp.Net.CookieCollection.

## Extension Methods

static | IsNull<T> (this T) : bool Determines whether the specified object is `null`.
static | IsNullDo<T> (this T, Action) : bool Determines whether the specified object is `null`. And invokes the specified Action delegate if the specified object is `null`.

## Member Details

### CookieCollection Constructor

> Initializes a new instance of the WebSocketSharp.Net.CookieCollection class.

> ## Syntax

> public CookieCollection ()

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Add Method

> Add the specified WebSocketSharp.Net.Cookie to the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> public void Add (Cookie cookie)

> #### Parameters

> > cookie
> >   A WebSocketSharp.Net.Cookie to add to the WebSocketSharp.Net.CookieCollection.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | cookie is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Add Method

> Add the elements of the specified WebSocketSharp.Net.CookieCollection to the current WebSocketSharp.Net.CookieCollection.

> ## Syntax

> public void Add (CookieCollection cookies)

> #### Parameters

> > cookies
> >   A WebSocketSharp.Net.CookieCollection to add to the current WebSocketSharp.Net.CookieCollection.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | cookies is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### CopyTo Method

> Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified Array, starting at the specified index in the array.

> ## Syntax

> public void CopyTo (Array array, int index)

> #### Parameters

> > array
> >   An Array is the destination of the elements copied from the WebSocketSharp.Net.CookieCollection.
> > index
> >   An int that indicates the zero-based index in array at which copying begins.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | array is `null`.
> > ArgumentOutOfRangeException | index is less than zero.
> > ArgumentException | array is multidimensional. -or- The number of elements in the WebSocketSharp.Net.CookieCollection is greater than the available space from index to the end of the destination array.
> > InvalidCastException | The elements in the WebSocketSharp.Net.CookieCollection cannot be cast automatically to the type of the destination array.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### CopyTo Method

> Copies the elements of the WebSocketSharp.Net.CookieCollection to the specified array of WebSocketSharp.Net.Cookie, starting at the specified index in the array.

> ## Syntax

> public void CopyTo (Cookie[] array, int index)

> #### Parameters

> > array
> >   An array of WebSocketSharp.Net.Cookie is the destination of the elements copied from the WebSocketSharp.Net.CookieCollection.
> > index
> >   An int that indicates the zero-based index in array at which copying begins.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | array is `null`.
> > ArgumentOutOfRangeException | index is less than zero.
> > ArgumentException | The number of elements in the WebSocketSharp.Net.CookieCollection is greater than the available space from index to the end of the destination array.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Count Property

> Gets the number of cookies contained in the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> public int Count { get; }

> #### Value

> > An int that indicates the number of cookies contained in the WebSocketSharp.Net.CookieCollection.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### GetEnumerator Method

> Gets the enumerator to use to iterate through the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> public IEnumerator GetEnumerator ()

> #### Returns

> > An instance of an implementation of the IEnumerator interface to use to iterate through the WebSocketSharp.Net.CookieCollection.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsReadOnly Property

> Gets a value indicating whether the WebSocketSharp.Net.CookieCollection is read-only.

> ## Syntax

> public bool IsReadOnly { get; }

> #### Value

> > `true` if the WebSocketSharp.Net.CookieCollection is read-only; otherwise, `false`. The default is `true`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### IsSynchronized Property

> Gets a value indicating whether access to the WebSocketSharp.Net.CookieCollection is thread safe.

> ## Syntax

> public bool IsSynchronized { get; }

> #### Value

> > `true` if access to the WebSocketSharp.Net.CookieCollection is thread safe; otherwise, `false`. The default is `false`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Item Property

> Gets the WebSocketSharp.Net.Cookie with the specified index from the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> This is the default property for this class.

> public Cookie this [int index] { get; }

> #### Parameters

> > index
> >   An int is the zero-based index of the WebSocketSharp.Net.Cookie to find.

> #### Value

> > A WebSocketSharp.Net.Cookie with the specified index in the WebSocketSharp.Net.CookieCollection.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentOutOfRangeException | index is less than zero or index is greater than or equal to CookieCollection.Count.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### Item Property

> Gets the WebSocketSharp.Net.Cookie with the specified name from the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> This is the default property for this class.

> public Cookie this [string name] { get; }

> #### Parameters

> > name
> >   A string is the name of the WebSocketSharp.Net.Cookie to find.

> #### Value

> > A WebSocketSharp.Net.Cookie with the specified name in the WebSocketSharp.Net.CookieCollection.

> #### Exceptions

> > Type | Reason
> > --- | ---
> > ArgumentNullException | name is `null`.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)

### SyncRoot Property

> Gets an object to use to synchronize access to the WebSocketSharp.Net.CookieCollection.

> ## Syntax

> public object SyncRoot { get; }

> #### Value

> > An object to use to synchronize access to the WebSocketSharp.Net.CookieCollection.

> ## Remarks

> Documentation for this section has not yet been entered.

> ## Requirements

> Namespace: WebSocketSharp.Net
> Assembly: websocket-sharp (in websocket-sharp.dll)