Search Results for

    Show / Hide Table of Contents
    View Source

    Class NavigationInitializationNotificationHandler

    Responsible for seeding the in-memory navigation structures at application's startup by rebuild the navigation structures.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Services.Navigation
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class NavigationInitializationNotificationHandler : INotificationAsyncHandler<PostRuntimePremigrationsUpgradeNotification>, INotificationHandler
    Remarks

    This handler listens for the PostRuntimePremigrationsUpgradeNotification and triggers a rebuild of both document and media navigation structures, including their respective recycle bins.

    Constructors

    View Source

    NavigationInitializationNotificationHandler(IRuntimeState, IDocumentNavigationManagementService, IMediaNavigationManagementService)

    Initializes a new instance of the NavigationInitializationNotificationHandler class.

    Declaration
    public NavigationInitializationNotificationHandler(IRuntimeState runtimeState, IDocumentNavigationManagementService documentNavigationManagementService, IMediaNavigationManagementService mediaNavigationManagementService)
    Parameters
    Type Name Description
    IRuntimeState runtimeState

    The runtime state service for checking the current runtime level.

    IDocumentNavigationManagementService documentNavigationManagementService

    The document navigation management service.

    IMediaNavigationManagementService mediaNavigationManagementService

    The media navigation management service.

    Methods

    View Source

    HandleAsync(PostRuntimePremigrationsUpgradeNotification, CancellationToken)

    Handles the PostRuntimePremigrationsUpgradeNotification by rebuilding the navigation structures for documents and media.

    Declaration
    public Task HandleAsync(PostRuntimePremigrationsUpgradeNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    PostRuntimePremigrationsUpgradeNotification notification

    The notification instance.

    CancellationToken cancellationToken

    A cancellation token to observe while waiting for the task to complete.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    Remarks

    This method only executes when the runtime level is at or above Upgrade. It rebuilds both the main navigation structures and the recycle bin structures for documents and media.

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