Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IAsyncComponent

    Represents a component.

    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IAsyncComponent
    Remarks

    Components are created by DI and therefore must have a public constructor.

    All components are terminated in reverse order when Umbraco terminates, and disposable components are disposed.

    Methods

    View Source

    InitializeAsync(Boolean, CancellationToken)

    Initializes the component.

    Declaration
    Task InitializeAsync(bool isRestarting, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Boolean isRestarting

    If set to true indicates Umbraco is restarting.

    CancellationToken cancellationToken

    The cancellation token. Cancellation indicates that the start process has been aborted.

    Returns
    Type Description
    Task

    A representing the asynchronous operation.

    View Source

    TerminateAsync(Boolean, CancellationToken)

    Terminates the component.

    Declaration
    Task TerminateAsync(bool isRestarting, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Boolean isRestarting

    If set to true indicates Umbraco is restarting.

    CancellationToken cancellationToken

    The cancellation token. Cancellation indicates that the shutdown process should no longer be graceful.

    Returns
    Type Description
    Task

    A representing the asynchronous operation.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • InitializeAsync(Boolean, CancellationToken)
      • TerminateAsync(Boolean, CancellationToken)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX