EGDL2 2.1
Loading...
Searching...
No Matches
WebSocketSharp.Net.Cookie Class Referencesealed

Provides a set of methods and properties used to manage an HTTP Cookie. More...

Public Member Functions

 Cookie ()
 Initializes a new instance of the Cookie class.
 
 Cookie (string name, string value)
 Initializes a new instance of the Cookie class with the specified name and value .
 
 Cookie (string name, string value, string path)
 Initializes a new instance of the Cookie class with the specified name , value , and path .
 
 Cookie (string name, string value, string path, string domain)
 Initializes a new instance of the Cookie class with the specified name , value , path , and domain .
 

Properties

string Comment [get, set]
 Gets or sets the value of the Comment attribute of the cookie.
 
Uri CommentUri [get, set]
 Gets or sets the value of the CommentURL attribute of the cookie.
 
bool Discard [get, set]
 Gets or sets a value indicating whether the client discards the cookie unconditionally when the client terminates.
 
string Domain [get, set]
 Gets or sets the value of the Domain attribute of the cookie.
 
bool Expired [get, set]
 Gets or sets a value indicating whether the cookie has expired.
 
DateTime Expires [get, set]
 Gets or sets the value of the Expires attribute of the cookie.
 
bool HttpOnly [get, set]
 Gets or sets a value indicating whether non-HTTP APIs can access the cookie.
 
string Name [get, set]
 Gets or sets the Name of the cookie.
 
string Path [get, set]
 Gets or sets the value of the Path attribute of the cookie.
 

Detailed Description

Provides a set of methods and properties used to manage an HTTP Cookie.

The Cookie class supports the following cookie formats: Netscape specification

, RFC 2109

, and RFC 2965

The Cookie class cannot be inherited.

Constructor & Destructor Documentation

◆ Cookie() [1/3]

WebSocketSharp.Net.Cookie.Cookie ( string name,
string value )
inline

Initializes a new instance of the Cookie class with the specified name and value .

Parameters
nameA string that represents the Name of the cookie.
valueA string that represents the Value of the cookie.
Exceptions
CookieExceptionname is null or empty.
  • or -
name contains an invalid character.
  • or -
value is null.
  • or -
value contains a string not enclosed in double quotes that contains an invalid character.

◆ Cookie() [2/3]

WebSocketSharp.Net.Cookie.Cookie ( string name,
string value,
string path )
inline

Initializes a new instance of the Cookie class with the specified name , value , and path .

Parameters
nameA string that represents the Name of the cookie.
valueA string that represents the Value of the cookie.
pathA string that represents the value of the Path attribute of the cookie.
Exceptions
CookieExceptionname is null or empty.
  • or -
name contains an invalid character.
  • or -
value is null.
  • or -
value contains a string not enclosed in double quotes that contains an invalid character.

◆ Cookie() [3/3]

WebSocketSharp.Net.Cookie.Cookie ( string name,
string value,
string path,
string domain )
inline

Initializes a new instance of the Cookie class with the specified name , value , path , and domain .

Parameters
nameA string that represents the Name of the cookie.
valueA string that represents the Value of the cookie.
pathA string that represents the value of the Path attribute of the cookie.
domainA string that represents the value of the Domain attribute of the cookie.
Exceptions
CookieExceptionname is null or empty.
  • or -
name contains an invalid character.
  • or -
value is null.
  • or -
value contains a string not enclosed in double quotes that contains an invalid character.

Property Documentation

◆ Comment

string WebSocketSharp.Net.Cookie.Comment
getset

Gets or sets the value of the Comment attribute of the cookie.

A string that represents the comment to document intended use of the cookie.

◆ CommentUri

Uri WebSocketSharp.Net.Cookie.CommentUri
getset

Gets or sets the value of the CommentURL attribute of the cookie.

A Uri that represents the URI that provides the comment to document intended use of the cookie.

◆ Discard

bool WebSocketSharp.Net.Cookie.Discard
getset

Gets or sets a value indicating whether the client discards the cookie unconditionally when the client terminates.

true if the client discards the cookie unconditionally when the client terminates; otherwise, false. The default value is false.

◆ Domain

string WebSocketSharp.Net.Cookie.Domain
getset

Gets or sets the value of the Domain attribute of the cookie.

A string that represents the URI for which the cookie is valid.

◆ Expired

bool WebSocketSharp.Net.Cookie.Expired
getset

Gets or sets a value indicating whether the cookie has expired.

true if the cookie has expired; otherwise, false. The default value is false.

◆ Expires

DateTime WebSocketSharp.Net.Cookie.Expires
getset

Gets or sets the value of the Expires attribute of the cookie.

A DateTime that represents the date and time at which the cookie expires. The default value is DateTime.MinValue.

◆ HttpOnly

bool WebSocketSharp.Net.Cookie.HttpOnly
getset

Gets or sets a value indicating whether non-HTTP APIs can access the cookie.

true if non-HTTP APIs cannot access the cookie; otherwise, false. The default value is false.

◆ Name

string WebSocketSharp.Net.Cookie.Name
getset

Gets or sets the Name of the cookie.

A string that represents the Name of the cookie.

Exceptions
CookieExceptionThe value specified for a set operation is null or empty.
  • or -
The value specified for a set operation contains an invalid character.

◆ Path

string WebSocketSharp.Net.Cookie.Path
getset

Gets or sets the value of the Path attribute of the cookie.

A string that represents the subset of URI on the origin server to which the cookie applies.


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