logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IPrimaryDeviceSelector

    Interface for selecting the primary input device for player input.

    Namespace: Serenity.InputGateway.Application.Interfaces.Components
    Assembly: Serenity.InputGateway.Application.dll
    Syntax
    public interface IPrimaryDeviceSelector

    Methods

    AwaitAsync(CancellationToken)

    Awaits the selection of the primary input device.

    Declaration
    Task<(string scheme, string deviceId, string displayName)> AwaitAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<(string scheme, string deviceId, string displayName)>

    A task that represents the asynchronous operation, containing a tuple with the selected device's scheme, device ID, and display name.

    Initialize(object, ILogService)

    Initializes the primary device selector with the specified player input handler.

    Declaration
    void Initialize(object playerInputHandler, ILogService logService)
    Parameters
    Type Name Description
    object playerInputHandler

    The player input handler to use for device selection.

    ILogService logService

    The logging service for diagnostic output.

    In this article
    © 2026 Serenity. All Rights Reserved