# GoogleApisDataStoreAdapter

Bridges an OfficeIMO token store to the data-store contract used by Google.Apis.Auth.

Class 

`OfficeIMO.GoogleWorkspace.Auth.GoogleApis`

**Namespace**

`OfficeIMO.GoogleWorkspace.Auth.GoogleApis`

**Assembly**

`OfficeIMO.GoogleWorkspace.Auth.GoogleApis`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[GoogleWorkspaceTokenStore.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L27)

**Implements**

`IDataStore`

**Modifiers**

sealed

Bridges an OfficeIMO token store to the data-store contract used by Google.Apis.Auth.

## Inheritance

- object
- GoogleApisDataStoreAdapter

Filter members 

Show inherited

## Constructors

`public GoogleApisDataStoreAdapter(IGoogleWorkspaceTokenStore store)` [#](#constructor-ctor-officeimo-googleworkspace-auth-googleapis-igoogleworkspacetokenstore)

[GoogleWorkspaceTokenStore.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L27)

Creates an adapter over an application-owned secure token store.

Parameters

**store OfficeIMO.GoogleWorkspace.Auth.GoogleApis.IGoogleWorkspaceTokenStore required**

Token store to expose through Google's data-store contract.

## Methods

`public Task ClearAsync()` [#](#method-clearasync)

[GoogleWorkspaceTokenStore.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L38)

Deletes all authorization state owned by this store.

Returns

`Task`

`public Task DeleteAsync<T>(string key)` [#](#method-deleteasync-string)

[GoogleWorkspaceTokenStore.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L34)

Deletes authorization state of the requested type under a key.

Type Parameters

**T**

Parameters

**key string required**

Returns

`Task`

`public Task<T?> GetAsync<T>(string key)` [#](#method-getasync-string)

[GoogleWorkspaceTokenStore.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L36)

Reads authorization state, returning null when the key is absent.

Type Parameters

**T**

Parameters

**key string required**

Returns

`Task<T?>`

`public Task StoreAsync<T>(string key, T? value)` [#](#method-storeasync-string)

[GoogleWorkspaceTokenStore.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace.Auth.GoogleApis/GoogleWorkspaceTokenStore.cs#L32)

Stores or replaces authorization state under a key.

Type Parameters

**T**

Parameters

**key string required**

**value T? required**

Returns

`Task`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:6C4B166FCAB6FE7EA35C471C9A3A3B99CED725C92A3454FA757C6B97C007EE5B -->
