Class NullDataStore (1.50.0)

public class NullDataStore : object, IDataStore

A null datastore. Nothing is stored, nothing is retrievable.

Inheritance

Object > NullDataStore

Implements

IDataStore

Namespace

Google.Apis.Util.Store

Assembly

Google.Apis.dll

Constructors

NullDataStore()

public NullDataStore()

Construct a new null datastore, that stores nothing.

Methods

ClearAsync()

public Task ClearAsync()
Returns
TypeDescription
Task

DeleteAsync<T>(String)

public Task DeleteAsync<T>(string key)
Parameter
NameDescription
keyString
Returns
TypeDescription
Task
Type Parameter
NameDescription
T

GetAsync<T>(String)

public Task<T> GetAsync<T>(string key)

Asynchronously returns the stored value for the given key or null if not found. This implementation of IDataStore will always return a completed task with a result of null.

Parameter
NameDescription
keyString

The key to retrieve its value.

Returns
TypeDescription
Task<T>

Always null.

Type Parameter
NameDescription
T

The type to retrieve from the data store.

StoreAsync<T>(String, T)

public Task StoreAsync<T>(string key, T value)

Asynchronously stores the given value for the given key (replacing any existing value). This implementation of IDataStore does not store the value, and will not return it in future calls to GetAsync<T>(String).

Parameters
NameDescription
keyString

The key.

valueT

The value.

Returns
TypeDescription
Task

A task that completes immediately.

Type Parameter
NameDescription
T

The type to store in the data store.

Extension Method