> ## Documentation Index
> Fetch the complete documentation index at: https://klef.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ConnectionContext

> What a connector gets for one call.

```csharp
public sealed class ConnectionContext
```

## Constructors

```csharp
public ConnectionContext()
```

## Properties

**Clock** `IClock` *required*

The clock to read the time from.

**Connection** `ConnectionRef` *required*

The connection the call is for.

**Http** `HttpClient` *required*

The client for calling the vendor.

**Installation** `IReadOnlyDictionary\<string, string\>` *required*

The values of the manifest's installation fields, which the host fills.

**Logger** `ILogger` *required*

The logger for the call.

**ReadCache** `ReadCache` *required*

The host's cache for one read.

**Settings** `IReadOnlyDictionary\<string, string\>` *required*

The connection's values, secrets decrypted.

**Stored** `IConnectionState` *required*

The values the connector stores.

**Tokens** `ITokenStore` *required*

The connection's access tokens.

**Transport** `HttpMessageHandler` *required*

The pipeline behind the client, without auth.

## Methods

### Config()

```csharp
public TConfig Config<TConfig>() where TConfig : IConnectorConfig<TConfig>
```

Reads the connection's typed settings.

#### Type Parameters

**TConfig** *required*

#### Returns

`TConfig`

### InstallationConfig()

```csharp
public TInstallation InstallationConfig<TInstallation>() where TInstallation : class, IConnectorConfig<TInstallation>
```

Reads the installation's typed settings.

#### Type Parameters

**TInstallation** *required*

#### Returns

`TInstallation`

### ReadOnceAsync()

```csharp
public Task<T> ReadOnceAsync<T>(Guid readId, string key, Func<Task<T>> fetch)
```

Fetches a value once per read.

#### Type Parameters

**T** *required*

#### Parameters

**readId** `Guid` *required*

**key** `string` *required*

**fetch** `Func\<Task\<T\>\>` *required*

#### Returns

`Task<T>`

### TransportClient()

```csharp
public HttpClient TransportClient()
```

Creates a client on the transport for a vendor SDK, which reads the vendor's error answers itself.

#### Returns

`HttpClient`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.