Table of Contents

Class TransportRegistry

Namespace
AnyProtocol
Assembly
AnyProtocol.dll

Stores and resolves transport registrations.

public sealed class TransportRegistry
Inheritance
TransportRegistry
Inherited Members

Constructors

TransportRegistry(IEnumerable<KeyValuePair<ProtocolKey, IMessagingProtocol>>)

Initializes a new instance of the TransportRegistry class.

public TransportRegistry(IEnumerable<KeyValuePair<ProtocolKey, IMessagingProtocol>> transports)

Parameters

transports IEnumerable<KeyValuePair<ProtocolKey, IMessagingProtocol>>

The transports.

TransportRegistry(IEnumerable<KeyValuePair<string, IMessagingProtocol>>)

Initializes a new instance of the TransportRegistry class.

public TransportRegistry(IEnumerable<KeyValuePair<string, IMessagingProtocol>> transports)

Parameters

transports IEnumerable<KeyValuePair<string, IMessagingProtocol>>

The transports.

Properties

All

Gets the all.

public IEnumerable<IMessagingProtocol> All { get; }

Property Value

IEnumerable<IMessagingProtocol>

The all.

Entries

Gets the entries.

public IEnumerable<KeyValuePair<ProtocolKey, IMessagingProtocol>> Entries { get; }

Property Value

IEnumerable<KeyValuePair<ProtocolKey, IMessagingProtocol>>

The entries.

Methods

GetRequired(ProtocolKey)

Gets required.

public IMessagingProtocol GetRequired(ProtocolKey protocol)

Parameters

protocol ProtocolKey

The protocol registration key.

Returns

IMessagingProtocol

The result of the get required operation.

GetRequired(string)

Gets required.

public IMessagingProtocol GetRequired(string name)

Parameters

name string

The registered instance name.

Returns

IMessagingProtocol

The result of the get required operation.

TryGet(ProtocolKey, out IMessagingProtocol?)

Attempts to get.

public bool TryGet(ProtocolKey protocol, out IMessagingProtocol? transport)

Parameters

protocol ProtocolKey

The protocol registration key.

transport IMessagingProtocol

The transport.

Returns

bool

true when the operation succeeds; otherwise, false.