#### [Abblix\.SharedSignals](https://www.abblix.com/en/docs/api/abblix-sharedsignals 'index')
### [Abblix\.SharedSignals\.Infrastructure](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Infrastructure 'Abblix\.SharedSignals\.Infrastructure')

## ServiceCollectionExtensions Class

Wires the package into a host's service collection, one call per role\. Both build on the
Security Events core the host has already wired \- key trust and signing are deployment
knowledge that belongs to that call \- and every registration here lets a host
pre\-registration win: the extensions supply defaults, never overrides\.

```csharp
public static class ServiceCollectionExtensions
```

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

## ServiceCollectionExtensions\.AddSharedSignalsConfiguredStreams\(this IServiceCollection, IReadOnlyList\<ConfiguredStream\>\) Method {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_)}

Declares the transmitter's stream set as configuration: the store of a closed
deployment whose receivers are the operator's own products \- nothing to back up,
lifecycle in the operator's file, API mutations ephemeral until restart\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsConfiguredStreams(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_).services}

The service collection\.

###### `streams` [System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[ConfiguredStream](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.ConfiguredStream 'Abblix\.SharedSignals\.Transmitter\.ConfiguredStream')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_).streams}

The declared streams\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')

### Remarks

Replace rather than TryAdd, deliberately: this call IS the host's explicit choice of
store, so it wins whether it runs before or after
[AddSharedSignalsTransmitter\(this IServiceCollection, SharedSignalsTransmitterOptions\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsTransmitter(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions) 'Abblix\.SharedSignals\.Infrastructure\.ServiceCollectionExtensions\.AddSharedSignalsTransmitter\(this Microsoft\.Extensions\.DependencyInjection\.IServiceCollection, Abblix\.SharedSignals\.Transmitter\.SharedSignalsTransmitterOptions\)')'s in-memory default.

The declarations are reconciled into a backing store, and this overload's is in memory -
right for one instance, and the reason a receiver's pause reaches no further than the
instance that took the request. A transmitter running several passes a shared one, which
`AddSharedSignalsRedisConfiguredStreams` does.

## ServiceCollectionExtensions\.AddSharedSignalsConfiguredStreams\(this IServiceCollection, IReadOnlyList\<ConfiguredStream\>, Func\<IServiceProvider,IStreamStore\>\) Method {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_,System.Func_System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore_)}

Declares the transmitter's stream set as configuration, reconciled into a backing store the
caller chooses \- the form a deployment running more than one instance takes, so that the
half of a stream its receiver owns is shared rather than per\-instance\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsConfiguredStreams(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams, System.Func<System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore> backingStore);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_,System.Func_System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore_).services}

The service collection\.

###### `streams` [System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[ConfiguredStream](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.ConfiguredStream 'Abblix\.SharedSignals\.Transmitter\.ConfiguredStream')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_,System.Func_System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore_).streams}

The declared streams\.

###### `backingStore` [System\.Func&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2')[System\.IServiceProvider](https://learn.microsoft.com/en-us/dotnet/api/system.iserviceprovider 'System\.IServiceProvider')[,](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2')[IStreamStore](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_,System.Func_System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore_).backingStore}

Builds the store the declarations are reconciled into\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')

### Remarks
The backing store is built by a factory rather than resolved from the container, because
the container's [IStreamStore](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore') is what this call registers: resolving it would
hand the store itself\.

## ServiceCollectionExtensions\.AddSharedSignalsDistributedOutbox\(this IServiceCollection\) Method {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsDistributedOutbox(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection)}

Puts the transmitter's outbox on the host's `IDistributedCache`, so pending events
survive a process restart when the store behind the cache does\. Replace rather than
TryAdd for the same reason as
[AddSharedSignalsConfiguredStreams\(this IServiceCollection, IReadOnlyList&lt;ConfiguredStream&gt;\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_) 'Abblix\.SharedSignals\.Infrastructure\.ServiceCollectionExtensions\.AddSharedSignalsConfiguredStreams\(this Microsoft\.Extensions\.DependencyInjection\.IServiceCollection, System\.Collections\.Generic\.IReadOnlyList\<Abblix\.SharedSignals\.Transmitter\.ConfiguredStream\>\)'):
an explicit choice wins in any order\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsDistributedOutbox(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsDistributedOutbox(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection).services}

The service collection\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')

### Remarks
Surviving a restart and surviving a second instance are different properties, and this call
buys the first only\. `IDistributedCache` writes whole values with no compare\-and\-set,
so two instances editing one stream's queue overwrite each other; a transmitter running
more than one instance takes `AddSharedSignalsRedisOutbox` instead\.

## ServiceCollectionExtensions\.AddSharedSignalsReceiver\(this IServiceCollection, SharedSignalsValidationOptions\) Method {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsReceiver(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions)}

Registers the receiver role: the push intake handler over the receiver's OWN validation
profile, with the three SSF steps joined in their required positions \- the cheap "sub"
rejection among the unverified checks, the stream\-issuer binding among the trusted ones,
the critical\-members check last\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsReceiver(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions options);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsReceiver(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions).services}

The service collection\.

###### `options` [SharedSignalsValidationOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions 'Abblix\.SharedSignals\.Receiver\.SecurityEvent\.SharedSignalsValidationOptions') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsReceiver(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions).options}

What this receiver expects of every token; registered as the shared instance, so a host
pre\-registering its own [SharedSignalsValidationOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions 'Abblix\.SharedSignals\.Receiver\.SecurityEvent\.SharedSignalsValidationOptions') wins\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')

### Remarks

The receiver validates under its own named profile
([Abblix\.SecurityEvents\.Infrastructure\.ValidationProfileKeys\.SecurityEvent](https://learn.microsoft.com/en-us/dotnet/api/abblix.securityevents.infrastructure.validationprofilekeys.securityevent 'Abblix\.SecurityEvents\.Infrastructure\.ValidationProfileKeys\.SecurityEvent')) rather than by editing the host's plain
family. The plain family is shared, and another consumer of security event tokens in the
same host - Back-Channel Logout is the live example - shapes it to demands a SET
contradicts outright: its `typ` replacement refuses everything that is not a logout
token, its `exp` replacement requires the claim a SET must not carry. Editing the
shared family therefore either breaks that consumer or is broken by it, depending on
registration order, and the loser sees every one of its tokens refused. A named profile
removes the ordering from the outcome: each consumer owns its copy, and this package's
steps and critical declarations bind to this profile alone.

The host still owes two registrations of its own: an
[Abblix\.SecurityEvents\.Delivery\.ISecurityEventSink](https://learn.microsoft.com/en-us/dotnet/api/abblix.securityevents.delivery.isecurityeventsink 'Abblix\.SecurityEvents\.Delivery\.ISecurityEventSink'), because where events
land is the application, and key resolution (for example
`AddJwksKeyResolution`), because key trust is deployment knowledge. A replay cache
(`AddDistributedReplayCache`) is optional and picked up when present.

## ServiceCollectionExtensions\.AddSharedSignalsTransmitter\(this IServiceCollection, SharedSignalsTransmitterOptions\) Method {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsTransmitter(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions)}

Registers the transmitter role: the in\-memory stream store and outbox as replaceable
defaults, the dispatcher, the management service, the poll endpoint handler, and the
push sender as a typed HTTP client\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsTransmitter(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions options);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsTransmitter(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions).services}

The service collection\.

###### `options` [SharedSignalsTransmitterOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions 'Abblix\.SharedSignals\.Transmitter\.SharedSignalsTransmitterOptions') {#Abblix.SharedSignals.Infrastructure.ServiceCollectionExtensions.AddSharedSignalsTransmitter(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions).options}

The deployment's one\-time decisions; registered as the shared instance, so a host
pre\-registering its own [SharedSignalsTransmitterOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions 'Abblix\.SharedSignals\.Transmitter\.SharedSignalsTransmitterOptions') wins\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')
