docs.unity.cn
    Show / Hide Table of Contents

    Struct CoreRegistration

    Handle to a registered IInitializablePackage. Provides a fluent interface to define its components dependencies and provisions.

    Namespace: Unity.Services.Core.Internal
    Syntax
    public readonly struct CoreRegistration

    Methods

    DependsOn<T>()

    Declare the given component type a dependency of the handled package.

    Declaration
    public readonly CoreRegistration DependsOn<T>()
        where T : IServiceComponent
    Returns
    Type Description
    CoreRegistration

    Return this registration.

    Type Parameters
    Name Description
    T

    The type of IServiceComponent to declare as a dependency for the handled package.

    OptionallyDependsOn<T>()

    Declare the given component type an optional dependency of the handled package.

    Declaration
    public readonly CoreRegistration OptionallyDependsOn<T>()
        where T : IServiceComponent
    Returns
    Type Description
    CoreRegistration

    Return this registration.

    Type Parameters
    Name Description
    T

    The type of IServiceComponent to declare as an optional dependency for the handled package.

    ProvidesComponent<T>()

    Declare the given component type a provided component by the handled package.

    Declaration
    public readonly CoreRegistration ProvidesComponent<T>()
        where T : IServiceComponent
    Returns
    Type Description
    CoreRegistration

    Return this registration.

    Type Parameters
    Name Description
    T

    The type of IServiceComponent to declare provided by the handled package.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, April 26, 2022
    Terms of use