Table of Contents

Class NatsHostingExtensions

Namespace
NATS.Client.Hosting
Assembly
NATS.Client.Hosting.dll
public static class NatsHostingExtensions
Inheritance
NatsHostingExtensions
Inherited Members

Methods

AddNats(IServiceCollection, int, Func<NatsOpts, NatsOpts>?, Action<NatsConnection>?)

Add NatsConnection/Pool to ServiceCollection. When poolSize = 1, registered NatsConnection and INatsConnection as singleton. Others, registered NatsConnectionPool as singleton, NatsConnection and INatsConnection as transient(get from pool).