CookieContainerclass

object→CookieContainer
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.CookieContainer

Methods7

Showing 7 methods

public T Get(string key, T fallback)PUBLIC

Load JSON encodable data from cookies

ParameterTypeDescription
keystring—
fallbackT—
Returns:T—

public string GetString(string key, string fallback)PUBLIC

Get a stored session cookie.

ParameterTypeDescription
keystring—
fallbackstring—
Returns:string—

public void Remove(string key)PUBLIC

Removes a cookie from the cache entirely

ParameterTypeDescription
keystring—
Returns:void—

public void Set(string key, T value)PUBLIC

Set JSON encodable object to data

ParameterTypeDescription
keystring—
valueT—
Returns:void—

public void SetString(string key, string value)PUBLIC

Set a cookie to be stored between sessions. The cookie will expire one month from when it was set.

ParameterTypeDescription
keystring—
valuestring—
Returns:void—

public bool TryGet(string key, T val)PUBLIC

ParameterTypeDescription
keystring—
valT—
Returns:bool—

public bool TryGetString(string key, string val)PUBLIC

Get a stored session cookie.

ParameterTypeDescription
keystring—
valstring—
Returns:bool—

On this page