namespace SOR.Networking.Redis;
using Microsoft.Extensions.DependencyInjection;
using SOR.Networking.Abstractions.Push;
///
/// Registers the Redis client push service in the DI container.
///
/// Note: IConnectionMultiplexer and IMessageSerializer must already be registered
/// before calling this (both are registered in SOR.Host.Program.cs).
///
/// To replace Redis Pub/Sub with another push delivery mechanism:
/// Create an alternative IClientPush implementation and call its registration
/// method instead of AddRedisClientPush(). No Gateway or service code changes.
///
public static class ServiceRegistration
{
///
/// Registers IClientPush → RedisClientPush as a Singleton.
///
/// Preconditions (must be registered in DI before calling this):
/// - IConnectionMultiplexer (StackExchange.Redis)
/// - IMessageSerializer (from SOR.Shared.ServiceRegistration.AddSharedServices)
///
public static IServiceCollection AddRedisClientPush(this IServiceCollection services)
{
services.AddSingleton();
return services;
}
}