My Project
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
WebSocketSharp.Net.CookieCollection Class Reference

Provides a collection of instances of the Cookie class. More...

Inheritance diagram for WebSocketSharp.Net.CookieCollection:

Public Member Functions

 CookieCollection ()
 Initializes a new instance of the CookieCollection class.
 
void Add (Cookie cookie)
 Adds the specified cookie to the collection.
 
void Add (CookieCollection cookies)
 Adds the specified cookies to the collection.
 
void Clear ()
 Removes all cookies from the collection.
 
bool Contains (Cookie cookie)
 Determines whether the collection contains the specified cookie.
 
void CopyTo (Cookie[] array, int index)
 Copies the elements of the collection to the specified array, starting at the specified index.
 
IEnumerator< CookieGetEnumerator ()
 Gets the enumerator that iterates through the collection.
 
bool Remove (Cookie cookie)
 Removes the specified cookie from the collection.
 

Properties

int Count [get]
 Gets the number of cookies in the collection.
 
bool IsReadOnly [get, set]
 Gets a value indicating whether the collection is read-only.
 
bool IsSynchronized [get]
 Gets a value indicating whether the access to the collection is thread safe.
 
Cookie this[int index] [get]
 Gets the cookie at the specified index from the collection.
 
Cookie this[string name] [get]
 Gets the cookie with the specified name from the collection.
 
object SyncRoot [get]
 Gets an object used to synchronize access to the collection.
 

Detailed Description

Provides a collection of instances of the Cookie class.

Member Function Documentation

◆ Add() [1/2]

void WebSocketSharp.Net.CookieCollection.Add ( Cookie  cookie)
inline

Adds the specified cookie to the collection.

Parameters
cookieA Cookie to add.
Exceptions
InvalidOperationExceptionThe collection is read-only.
ArgumentNullExceptioncookie is null.

◆ Add() [2/2]

void WebSocketSharp.Net.CookieCollection.Add ( CookieCollection  cookies)
inline

Adds the specified cookies to the collection.

Parameters
cookiesA CookieCollection that contains the cookies to add.
Exceptions
InvalidOperationExceptionThe collection is read-only.
ArgumentNullExceptioncookies is null.

◆ Clear()

void WebSocketSharp.Net.CookieCollection.Clear ( )
inline

Removes all cookies from the collection.

Exceptions
InvalidOperationExceptionThe collection is read-only.

◆ Contains()

bool WebSocketSharp.Net.CookieCollection.Contains ( Cookie  cookie)
inline

Determines whether the collection contains the specified cookie.

Returns
true if the cookie is found in the collection; otherwise, false.
Parameters
cookieA Cookie to find.
Exceptions
ArgumentNullExceptioncookie is null.

◆ CopyTo()

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

Copies the elements of the collection to the specified array, starting at the specified index.

Parameters
arrayAn array of Cookie that specifies the destination of the elements copied from the collection.
indexAn int that specifies the zero-based index in the array at which copying starts.
Exceptions
ArgumentNullExceptionarray is null.
ArgumentOutOfRangeExceptionindex is less than zero.
ArgumentExceptionThe space from index to the end of array is not enough to copy to.

◆ GetEnumerator()

IEnumerator< Cookie > WebSocketSharp.Net.CookieCollection.GetEnumerator ( )
inline

Gets the enumerator that iterates through the collection.

Returns
An T:System.Collections.Generic.IEnumerator<Cookie> instance that can be used to iterate through the collection.

◆ Remove()

bool WebSocketSharp.Net.CookieCollection.Remove ( Cookie  cookie)
inline

Removes the specified cookie from the collection.

Returns
true if the cookie is successfully removed; otherwise, false.

false if the cookie is not found in the collection.

Parameters
cookieA Cookie to remove.
Exceptions
InvalidOperationExceptionThe collection is read-only.
ArgumentNullExceptioncookie is null.

Property Documentation

◆ Count

int WebSocketSharp.Net.CookieCollection.Count
get

Gets the number of cookies in the collection.

An int that represents the number of cookies in the collection.

◆ IsReadOnly

bool WebSocketSharp.Net.CookieCollection.IsReadOnly
getset

Gets a value indicating whether the collection is read-only.

true if the collection is read-only; otherwise, false.

The default value is false.

◆ IsSynchronized

bool WebSocketSharp.Net.CookieCollection.IsSynchronized
get

Gets a value indicating whether the access to the collection is thread safe.

true if the access to the collection is thread safe; otherwise, false.

The default value is false.

◆ SyncRoot

object WebSocketSharp.Net.CookieCollection.SyncRoot
get

Gets an object used to synchronize access to the collection.

An object used to synchronize access to the collection.

◆ this[int index]

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

Gets the cookie at the specified index from the collection.

A Cookie at the specified index in the collection.

Parameters
indexAn int that specifies the zero-based index of the cookie to find.
Exceptions
ArgumentOutOfRangeExceptionindex is out of allowable range for the collection.

◆ this[string name]

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

Gets the cookie with the specified name from the collection.

A Cookie with the specified name in the collection.

null if not found.

Parameters
nameA string that specifies the name of the cookie to find.
Exceptions
ArgumentNullExceptionname is null.

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