logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface ITaskServices

    Interface for accessing various task-related services.

    Namespace: Serenity.Tasking.Application.Interfaces
    Assembly: Serenity.Global.Application.dll
    Syntax
    public interface ITaskServices

    Methods

    GetRequired<T>()

    Gets a required service of the specified type. Throws an exception if the service is not found.

    Declaration
    T GetRequired<T>()
    Returns
    Type Description
    T

    The service instance.

    Type Parameters
    Name Description
    T

    The type of service to retrieve.

    TryGet<T>(out T)

    Tries to get a service of the specified type.

    Declaration
    bool TryGet<T>(out T service)
    Parameters
    Type Name Description
    T service

    When this method returns, contains the service instance if found; otherwise, the default value for the type.

    Returns
    Type Description
    bool

    true if the service was found; otherwise, false.

    Type Parameters
    Name Description
    T

    The type of service to retrieve.

    In this article
    © 2026 Serenity. All Rights Reserved