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
Type Description
Task

DeleteAsync<T>(String)

public Task DeleteAsync<T>(string key)
Parameter
Name Description
key String
Returns
Type Description
Task
Type Parameter
Name Description
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
Name Description
key String

The key to retrieve its value.

Returns
Type Description
Task<T>

Always null.

Type Parameter
Name Description
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
Name Description
key String

The key.

value T

The value.

Returns
Type Description
Task

A task that completes immediately.

Type Parameter
Name Description
T

The type to store in the data store.

Extension Method