Skip to content

Class RedisEventSourcingServiceCollectionExtensions

Namespace: Cephalon.EventSourcing.Redis.Hosting
Assembly: Cephalon.EventSourcing.Redis.dll

Registers the Redis Streams event-store provider used by Cephalon hosts.

public static class RedisEventSourcingServiceCollectionExtensions

objectRedisEventSourcingServiceCollectionExtensions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

AddCephalonRedisEventSourcing(IServiceCollection, string, string)

Section titled “ AddCephalonRedisEventSourcing(IServiceCollection, string, string)”

Adds the Redis Streams event-store provider to the service collection.

public static IServiceCollection AddCephalonRedisEventSourcing(this IServiceCollection services, string configuration, string keyPrefix = "cephalon:")

services IServiceCollection

The service collection to extend.

configuration string

The StackExchange.Redis connection string or configuration (e.g. “localhost:6379”).

keyPrefix string

The key prefix applied to all stream keys. Defaults to “cephalon:”. Stream keys follow the pattern {keyPrefix}stream:{streamId}.

IServiceCollection

The same service collection for fluent registration.