<PackageReference Include="System.ClientModel" Version="1.7.0" />

ClientConnectionCollection

Represents a collection of client connections.
using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Text.Json.Serialization; namespace System.ClientModel.Primitives { [JsonConverter(typeof(ConnectionCollectionConverter))] [DebuggerTypeProxy(typeof(ConnectionCollectionViewer))] public class ClientConnectionCollection : KeyedCollection<string, ClientConnection> { protected override string GetKeyForItem(ClientConnection item) { return item.Id; } public void AddRange(IEnumerable<ClientConnection> connections) { foreach (ClientConnection connection in connections) { Add(connection); } } } }