Search Results for

    Show / Hide Table of Contents
    View Source

    Class AsyncComponentBase

    Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class AsyncComponentBase : IAsyncComponent
    Remarks

    By default, the component will not execute if Umbraco is restarting.

    Methods

    View Source

    CanExecute(bool)

    Determines whether the component can execute.

    Declaration
    protected virtual bool CanExecute(bool isRestarting)
    Parameters
    Type Name Description
    bool isRestarting

    If set to true indicates Umbraco is restarting.

    Returns
    Type Description
    bool

    true if the component can execute; otherwise, false.

    View Source

    InitializeAsync(bool, CancellationToken)

    Initializes the component.

    Declaration
    public Task InitializeAsync(bool isRestarting, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    bool 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 System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    InitializeAsync(CancellationToken)

    Initializes the component.

    Declaration
    protected abstract Task InitializeAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

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

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    TerminateAsync(bool, CancellationToken)

    Terminates the component.

    Declaration
    public Task TerminateAsync(bool isRestarting, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    bool 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 System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    TerminateAsync(CancellationToken)

    Terminates the component.

    Declaration
    protected virtual Task TerminateAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

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

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX