CookieCollection
Wisej.Base.CookieCollection
Last updated
Wisej.Base.CookieCollection
Last updated
Namespace: Wisej.Base
Assembly: Wisej.Framework (2.2.0.0)
Manages the collection of cookies for the current application.
Int32: Returns the number of Cookie items in the collection.
String: Returns the Cookie with a specific name from a CookieCollection.
Throws:
ArgumentNullException name is null.
Cookie: Returns the Cookie with a specific name from a CookieCollection.
Throws:
IndexOutOfRangeException index is out of range.
Adds a cookie to the collection.
Parameter | Type | Description |
---|---|---|
cookie | The cookie to add. |
Adds a new cookie to the collection.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie. | |
value | The value of the new cookie to add. |
Returns: Cookie.
Adds a new cookie to the collection.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie. | |
value | The value of the new cookie to add. | |
domain | The domain, or partial domain, associated with the cookie. |
Returns: Cookie.
Adds a new cookie to the collection.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie. | |
value | The value of the new cookie. | |
expires | The expiration date/time of the new cookie. |
Returns: Cookie.
Adds a new cookie to the collection.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie. | |
value | The value of the new cookie. | |
domain | The value of the new cookie. | |
expires | The expiration date/time of the new cookie. |
Returns: Cookie.
Delete all cookies from the collection. NOTE: Cookies are only removed from the collection, not from the client. You need to set the expiration date to remove it from the client.
Determines whether the cookie is present in the collection.
Parameter | Type | Description |
---|---|---|
cookie | The cookie to locate. |
Returns: Boolean.
Copies the cookie collection to a compatible one-dimensional array, starting at the specified index of the target array.
Parameter | Type | Description |
---|---|---|
array | The one-dimensional System.Array that is the destination of the elements copied. | |
index | The zero-based index in array at which copying begins. |
Returns the cookie with the specified name.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie to locate. |
Returns: Cookie.
Returns: IEnumerator<Cookie>.
Searches for the specified cookie and returns the zero-based index of the first occurrence.
Parameter | Type | Description |
---|---|---|
cookie | The cookie to locate. |
Returns: Int32.
Searches for the specified cookie by name and returns the zero-based index of the first occurrence.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name cookie to locate. |
Returns: Int32.
Removes the specified cookie from the collection. NOTE: Cookies are only removed from the collection, not from the client. You need to set the expiration date to remove it from the client.
Parameter | Type | Description |
---|---|---|
cookie | The cookie to remove from the collection. |
Returns: Boolean. true if item is successfully removed; otherwise, false.
Removes the specified cookie from the collection. NOTE: Cookies are only removed from the collection, not from the client. You need to set the expiration date to remove it from the client.
Parameter | Type | Description |
---|---|---|
name | The case-sensitive name of the cookie to remove from the collection. |
Returns: Boolean. true if item is successfully removed; otherwise, false.
Removes the cookie at the specified index. NOTE: Cookies are only removed from the collection, not from the client. You need to set the expiration date to remove it from the client.
Parameter | Type | Description |
---|---|---|
index | The zero-based index of the element to remove. |