ข้ามไปยังเนื้อหา

Class NatsEventSourcingServiceCollectionExtensions

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

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

Registers the NATS JetStream KV event-store provider used by Cephalon hosts.

public static class NatsEventSourcingServiceCollectionExtensions

objectNatsEventSourcingServiceCollectionExtensions

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

AddCephalonNatsEventSourcing(IServiceCollection, string, string)

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

Adds the NATS event-store provider to the service collection.

public static IServiceCollection AddCephalonNatsEventSourcing(this IServiceCollection services, string url, string bucketName = "cephalon-events")

services IServiceCollection

The service collection to extend.

url string

The NATS server URL (e.g. “nats://localhost:4222”).

bucketName string

The JetStream KV bucket name used for event stream entries. Defaults to cephalon-events.

IServiceCollection

The same service collection for fluent registration.

does not connect on construction — the connection is deferred to the first operation. DI resolution does not require a live NATS server.