Skip to content
Documentation

IConnectionSemaphoreCollection<TConnection> Interface

Manages a collection of named System.Threading.SemaphoreSlim instances that throttle the number of concurrent connections per connection name.

public interface IConnectionSemaphoreCollection<TConnection> : System.Collections.Generic.IEnumerable<string>, System.Collections.IEnumerable

TConnection

The connection type that the semaphores guard.

Implements System.Collections.Generic.IEnumerable<System.String>, System.Collections.IEnumerable

Enumerating this collection yields the connection names for which a semaphore has been created.

IConnectionSemaphoreCollection<TConnection>.GetOrCreate(string, int) Method

Section titled “IConnectionSemaphoreCollection<TConnection>.GetOrCreate(string, int) Method”

Returns the existing System.Threading.SemaphoreSlim for the given connectionName, or creates a new one allowing up to maxConnections concurrent entries.

System.Threading.SemaphoreSlim GetOrCreate(string connectionName, int maxConnections);

connectionName System.String

The logical name identifying the connection whose semaphore is requested.

maxConnections System.Int32

The maximum number of concurrent connections the semaphore should allow if a new one is created.

System.Threading.SemaphoreSlim
A System.Threading.SemaphoreSlim that limits concurrent access for the specified connection name.

© 2026 Volue.Version v0.6.38017 November 2026