#### [Abblix\.Oidc\.Server\.SharedSignals](https://www.abblix.com/docs/api/abblix-oidc-server-sharedsignals 'index')
### [Abblix\.Oidc\.Server\.SharedSignals](https://www.abblix.com/docs/api/abblix-oidc-server-sharedsignals/Abblix.Oidc.Server.SharedSignals 'Abblix\.Oidc\.Server\.SharedSignals')

## TenantStreamStore Class

Keeps each tenant's streams apart in a store shared by every tenant\.

```csharp
public sealed class TenantStreamStore : Abblix.SharedSignals.Transmitter.IStreamStore
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → TenantStreamStore

Implements [IStreamStore](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore')

### Remarks
A stream is stored under its receiver's identifier prefixed with the tenant's space, which names the tenant and
its generation, and handed back without it\. So one tenant's receiver never finds another's stream, a listing
returns only this tenant's streams, and a tenant created again under the identifier of one removed takes
over none of them\.
### Constructors

## TenantStreamStore\(IStreamStore, TenantDefinition\) Constructor {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TenantStreamStore(Abblix.SharedSignals.Transmitter.IStreamStore,Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition)}

Keeps each tenant's streams apart in a store shared by every tenant\.

```csharp
public TenantStreamStore(Abblix.SharedSignals.Transmitter.IStreamStore inner, Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant);
```
#### Parameters

###### `inner` [IStreamStore](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TenantStreamStore(Abblix.SharedSignals.Transmitter.IStreamStore,Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition).inner}

The store every tenant shares\.

###### `tenant` [TenantDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantDefinition') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TenantStreamStore(Abblix.SharedSignals.Transmitter.IStreamStore,Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition).tenant}

The tenant whose streams these are\.

### Remarks
A stream is stored under its receiver's identifier prefixed with the tenant's space, which names the tenant and
its generation, and handed back without it\. So one tenant's receiver never finds another's stream, a listing
returns only this tenant's streams, and a tenant created again under the identifier of one removed takes
over none of them\.
### Methods

## TenantStreamStore\.DeleteAsync\(string, string, CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken)}

Deletes a stream \(SSF 1\.0 Section 8\.1\.1\.5\)\.

```csharp
public System.Threading.Tasks.Task<bool> DeleteAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).receiverId}

The receiver the stream belongs to\.

###### `streamId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).streamId}

The stream's identifier\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [DeleteAsync\(string, string, CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.DeleteAsync\(System\.String,System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when deleted; false when no such stream existed\.

## TenantStreamStore\.FindAsync\(string, string, CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.FindAsync(string,string,System.Threading.CancellationToken)}

Finds one stream of one receiver\.

```csharp
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.StreamState?> FindAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.FindAsync(string,string,System.Threading.CancellationToken).receiverId}

The receiver the stream belongs to\.

###### `streamId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.FindAsync(string,string,System.Threading.CancellationToken).streamId}

The stream's identifier\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.FindAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [FindAsync\(string, string, CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.FindAsync(string,string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.FindAsync\(System\.String,System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[StreamState](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The stream's state, or null when no such stream exists for this receiver\.

## TenantStreamStore\.ListAllAsync\(CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.ListAllAsync(System.Threading.CancellationToken)}

Lists every stream of every receiver \- the dispatcher's view, since an event is matched
against all streams at once\.

```csharp
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.StreamState>> ListAllAsync(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.ListAllAsync(System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [ListAllAsync\(CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.ListAllAsync(System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.ListAllAsync\(System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[StreamState](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')

## TenantStreamStore\.ListAsync\(string, CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.ListAsync(string,System.Threading.CancellationToken)}

Lists the streams of one receiver, for the list form of the configuration read
\(SSF 1\.0 Section 8\.1\.1\.2\)\. An empty list is a receiver with no streams, never an error\.

```csharp
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.StreamState>> ListAsync(string receiverId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.ListAsync(string,System.Threading.CancellationToken).receiverId}

The receiver whose streams are listed\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.ListAsync(string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [ListAsync\(string, CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.ListAsync(string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.ListAsync\(System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[StreamState](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')

## TenantStreamStore\.TryCreateAsync\(StreamState, CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken)}

Stores a new stream\.

```csharp
public System.Threading.Tasks.Task<bool> TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState stream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `stream` [StreamState](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).stream}

The stream's initial state\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [TryCreateAsync\(StreamState, CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.TryCreateAsync\(Abblix\.SharedSignals\.Transmitter\.StreamState,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when stored; false when a stream with the same receiver and identifier
            already exists\.

## TenantStreamStore\.UpdateAsync\(StreamState, CancellationToken\) Method {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken)}

Replaces a stream's state with a new snapshot, keyed by its receiver and identifier\.

```csharp
public System.Threading.Tasks.Task<bool> UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState stream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `stream` [StreamState](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).stream}

The new state\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.Oidc.Server.SharedSignals.TenantStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [UpdateAsync\(StreamState, CancellationToken\)](https://www.abblix.com/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.UpdateAsync\(Abblix\.SharedSignals\.Transmitter\.StreamState,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when replaced; false when no such stream exists to replace\.
