Show / Hide Table of Contents

    Class HandlerSelector

    Class that represents a handler selector for incoming packets.

    Inheritance
    System.Object
    HandlerSelector
    Implements
    IHandlerSelector
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Mechanics
    Assembly: Fibula.Mechanics.dll
    Syntax
    public class HandlerSelector : IHandlerSelector

    Constructors

    | Improve this Doc View Source

    HandlerSelector(ILogger)

    Initializes a new instance of the HandlerSelector class.

    Declaration
    public HandlerSelector(ILogger logger)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    A reference to the logger in use.

    Methods

    | Improve this Doc View Source

    RegisterForPacketType(Type, IHandler)

    Registers a handler for a given packet type.

    Declaration
    public 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.

    | Improve this Doc View Source

    SelectForPacket(IIncomingPacket)

    Returns the most appropriate handler for the specified packet type.

    Declaration
    public 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.

    Implements

    IHandlerSelector

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.