Show / Hide Table of Contents

Class NullDataStore

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

Inheritance
object
NullDataStore
Implements
IDataStore
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Util.Store
Assembly: Google.Apis.dll
Syntax
public class NullDataStore : IDataStore

Constructors

NullDataStore()

Construct a new null datastore, that stores nothing.

Declaration
public NullDataStore()

Methods

ClearAsync()

Asynchronously clears all values in the data store.

Declaration
public Task ClearAsync()
Returns
Type Description
Task

DeleteAsync<T>(string)

Asynchronously deletes the given key. The type is provided here as well because the "real" saved key should contain type information as well, so the data store will be able to store the same key for different types.

Declaration
public Task DeleteAsync<T>(string key)
Parameters
Type Name Description
string key

The key to delete.

Returns
Type Description
Task
Type Parameters
Name Description
T

The type to delete from the data store.

GetAsync<T>(string)

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

Declaration
public Task<T> GetAsync<T>(string key)
Parameters
Type Name Description
string key

The key to retrieve its value.

Returns
Type Description
Task<T>

Always null.

Type Parameters
Name Description
T

The type to retrieve from the data store.

StoreAsync<T>(string, T)

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

Declaration
public Task StoreAsync<T>(string key, T value)
Parameters
Type Name Description
string key

The key.

T value

The value.

Returns
Type Description
Task

A task that completes immediately.

Type Parameters
Name Description
T

The type to store in the data store.

Implements

Google.Apis.Util.Store.IDataStore
In this article
Back to top Generated by DocFX