API ReferenceSandbox
CookieContainerclass
object→CookieContainer
Methods7
Showing 7 methods
public T Get(string key, T fallback)
Load JSON encodable data from cookies
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| fallback | T | — |
Returns:
T—public string GetString(string key, string fallback)
Get a stored session cookie.
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| fallback | string | — |
Returns:
string—public void Remove(string key)
Removes a cookie from the cache entirely
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
Returns:
void—public void Set(string key, T value)
Set JSON encodable object to data
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| value | T | — |
Returns:
void—public void SetString(string key, string value)
Set a cookie to be stored between sessions. The cookie will expire one month from when it was set.
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| value | string | — |
Returns:
void—public bool TryGet(string key, T val)
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| val | T | — |
Returns:
bool—public bool TryGetString(string key, string val)
Get a stored session cookie.
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| val | string | — |
Returns:
bool—No results match this filter.