Table of Contents

Class InfrastructureServiceCollectionExtensions

Namespace
Signal.Infrastructure
Assembly
Signal.Infrastructure.dll

DI registration of the infrastructure layer.

public static class InfrastructureServiceCollectionExtensions
Inheritance
InfrastructureServiceCollectionExtensions
Inherited Members

Methods

AddSignalInfrastructure(IServiceCollection)

Registers the signal-cli-rest-api adapters for all application ports, the typed HTTP client with its resilience pipeline, and the receivers. Usually called through AddSignal().

public static IServiceCollection AddSignalInfrastructure(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection.

Returns

IServiceCollection

services for chaining.

Remarks

Receivers are keyed services, keyed by ExecutionMode: Signal.Infrastructure.Receiving.PollingMessageReceiver for normal/native and Signal.Infrastructure.Receiving.WebSocketMessageReceiver for json-rpc/json-rpc-native. Resolving the non-keyed IMessageReceiver returns the one for the configured mode.

HTTP resilience (standard pipeline): per-attempt timeout = Timeout, retries with exponential backoff for GET/PUT/DELETE only (POST is never retried to avoid duplicate messages), and a circuit breaker. All services use TryAdd; register replacements beforehand to override them.