Search Results for

    Show / Hide Table of Contents
    View Source

    Class NotificationExtensions

    Provides extension methods for notifications to support state transfer.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Notifications
    Assembly: Umbraco.Core.dll
    Syntax
    public static class NotificationExtensions

    Methods

    View Source

    WithStateFrom<T, TSource>(T, TSource)

    Copies the state from a source notification to the target notification.

    Declaration
    public static T WithStateFrom<T, TSource>(this T notification, TSource source) where T : IStatefulNotification where TSource : IStatefulNotification
    Parameters
    Type Name Description
    T notification

    The notification to set state on.

    TSource source

    The source notification to copy state from.

    Returns
    Type Description
    T

    The notification with state copied, for method chaining.

    Type Parameters
    Name Description
    T

    The type of target notification.

    TSource

    The type of source notification.

    View Source

    WithState<T>(T, IDictionary<string, object?>?)

    Sets the state dictionary on a stateful notification.

    Declaration
    public static T WithState<T>(this T notification, IDictionary<string, object?>? state) where T : IStatefulNotification
    Parameters
    Type Name Description
    T notification

    The notification to set state on.

    IDictionary<string, object> state

    The state dictionary to set.

    Returns
    Type Description
    T

    The notification with state set, for method chaining.

    Type Parameters
    Name Description
    T

    The type of notification.

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