Class ProtocolRegistry
Metadata on IPeerProtocol.
Inherited Members
Namespace: PeerTalk.Protocols
Assembly: PeerTalk.dll
Syntax
public static class ProtocolRegistry
Fields
| Improve this Doc View SourceProtocols
All the peer protocols.
Declaration
public static Dictionary<string, Func<IPeerProtocol>> Protocols
Field Value
Type | Description |
---|---|
Dictionary<String, Func<IPeerProtocol>> |
Remarks
The key is the name and version of the peer protocol, like "/multiselect/1.0.0". The value is a Func that returns an new instance of the peer protocol.
Methods
| Improve this Doc View SourceDeregister(String)
Remove the specified protocol.
Declaration
public static void Deregister(string protocolName)
Parameters
Type | Name | Description |
---|---|---|
String | protocolName | The protocol name to remove. |
Register<T>()
Register a new protocol.
Declaration
public static void Register<T>()
where T : IPeerProtocol, new()
Type Parameters
Name | Description |
---|---|
T |