1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public class NullDataStore : IDataStore

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> NullDataStore

## Implements

[IDataStore](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Store.IDataStore.md.txt)

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apis.Util.Store](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Store.md.txt)

## Assembly

Google.Apis.dll

## Constructors

### NullDataStore()

    public NullDataStore()

Construct a new null datastore, that stores nothing.

## Methods

### ClearAsync()

    public Task ClearAsync()

Asynchronously clears all values in the data store.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` |   |

### DeleteAsync\<T\>(string)

    public Task DeleteAsync<T>(string key)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `string` The key to delete. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `T` | The type to delete from the data store. |

### 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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Store.IDataStore.md.txt) 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` | 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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Store.IDataStore.md.txt) does not store the value,
and will not return it in future calls to [GetAsync\<T\>(string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Store.NullDataStore.md.txt#Google_Apis_Util_Store_NullDataStore_GetAsync__1_System_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

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities.md.txt#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)