Interface IHandlerSelector
Interface for selectors of handlers.
Namespace: Fibula.Mechanics.Contracts.Abstractions
Assembly: Fibula.Mechanics.Contracts.dll
Syntax
public interface IHandlerSelector
Methods
| Improve this Doc View SourceRegisterForPacketType(Type, IHandler)
Registers a handler for a given packet type.
Declaration
void RegisterForPacketType(Type packetType, IHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.Type | packetType | The type of packet to register for. |
IHandler | handler | The handler to register. |
SelectForPacket(IIncomingPacket)
Returns the most appropriate handler for the specified packet type.
Declaration
IHandler SelectForPacket(IIncomingPacket packet)
Parameters
Type | Name | Description |
---|---|---|
IIncomingPacket | packet | The packet to select the handler for. |
Returns
Type | Description |
---|---|
IHandler | An instance of an IHandler implementaion. |