Table of Contents

Class JsonFileSessionStorage

Namespace: XboxAuthNet.Game.SessionStorages
Assembly: XboxAuthNet.Game.dll

public class JsonFileSessionStorage : ISessionStorage

Inheritance

objectJsonFileSessionStorage

Implements

ISessionStorage

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Extension Methods

Extensions.GetKeysForStoring(ISessionStorage)

Constructors

JsonFileSessionStorage(string)

public JsonFileSessionStorage(string filePath)

Parameters

filePath string

JsonFileSessionStorage(string, JsonSerializerOptions)

public JsonFileSessionStorage(string filePath, JsonSerializerOptions jsonSerializerOptions)

Parameters

filePath string

jsonSerializerOptions JsonSerializerOptions

Properties

Keys

public IEnumerable<string> Keys { get; }

Property Value

IEnumerable<string>

Methods

Clear()

public void Clear()

ContainsKey<T>(string)

public bool ContainsKey<T>(string key)

Parameters

key string

Returns

bool

Type Parameters

T

ContainsKey(string)

public bool ContainsKey(string key)

Parameters

key string

Returns

bool

Get<T>(string)

public T Get<T>(string key)

Parameters

key string

Returns

T

Type Parameters

T

GetKeyMode(string)

public SessionStorageKeyMode GetKeyMode(string key)

Parameters

key string

Returns

SessionStorageKeyMode

GetOrDefault<T>(string, T)

public T GetOrDefault<T>(string key, T defaultValue)

Parameters

key string

defaultValue T

Returns

T

Type Parameters

T

Remove(string)

public bool Remove(string key)

Parameters

key string

Returns

bool

Set<T>(string, T)

public void Set<T>(string key, T obj)

Parameters

key string

obj T

Type Parameters

T

SetKeyMode(string, SessionStorageKeyMode)

public void SetKeyMode(string key, SessionStorageKeyMode mode)

Parameters

key string

mode SessionStorageKeyMode

TryGetValue<T>(string, out T)

public bool TryGetValue<T>(string key, out T value)

Parameters

key string

value T

Returns

bool

Type Parameters

T