Search Results for

    Show / Hide Table of Contents
    View Source

    Class ComponentCollection

    Represents the collection of IAsyncComponent implementations.

    Inheritance
    object
    BuilderCollectionBase<IAsyncComponent>
    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public class ComponentCollection : BuilderCollectionBase<IAsyncComponent>, IBuilderCollection<IAsyncComponent>

    Constructors

    View Source

    ComponentCollection(Func<IEnumerable<IAsyncComponent>>, IProfilingLogger, ILogger<ComponentCollection>)

    Initializes a new instance of the ComponentCollection class.

    Declaration
    public ComponentCollection(Func<IEnumerable<IAsyncComponent>> items, IProfilingLogger profilingLogger, ILogger<ComponentCollection> logger)
    Parameters
    Type Name Description
    Func<IEnumerable<IAsyncComponent>> items

    A factory function that provides the component items.

    IProfilingLogger profilingLogger

    The profiling logger for timing component operations.

    ILogger<ComponentCollection> logger

    The logger for recording component lifecycle events.

    Methods

    View Source

    InitializeAsync(bool, CancellationToken)

    Initializes all components in the collection.

    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

    TerminateAsync(bool, CancellationToken)

    Terminates all components in the collection in reverse order.

    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
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX