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
transportsIEnumerable<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
transportsIEnumerable<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
protocolProtocolKeyThe protocol registration key.
Returns
- IMessagingProtocol
The result of the get required operation.
GetRequired(string)
Gets required.
public IMessagingProtocol GetRequired(string name)
Parameters
namestringThe 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
protocolProtocolKeyThe protocol registration key.
transportIMessagingProtocolThe transport.
Returns
- bool
true when the operation succeeds; otherwise, false.