Table of Contents

Class NotificationContext

Namespace
Dynamicweb.Extensibility.Notifications
Assembly
Dynamicweb.Core.dll

Use this object inside a Using statement to handle how notifications are handled. Can be used to suppress all notifications from objects and code run within this using block.

public class NotificationContext : IDisposable
Inheritance
NotificationContext
Implements
Inherited Members

Examples

 using (NotificationContext.SuppressNotifications)
{
     //run code in a context that suppresses further notifications
}

Constructors

NotificationContext(NotificationState)

Initializes a new instance of the NotificationContext class.

public NotificationContext(NotificationContext.NotificationState state)

Parameters

state NotificationContext.NotificationState

The state.

Properties

Current

Gets the current instance of the NotificationContext.

public static NotificationContext? Current { get; }

Property Value

NotificationContext

The current.

CurrentState

Gets the current state of the NotificationContext.

public static NotificationContext.NotificationState CurrentState { get; }

Property Value

NotificationContext.NotificationState

The state of the current.

Notify

Gets the NotificationContext.

public static NotificationContext Notify { get; }

Property Value

NotificationContext

The NotificationContext.

State

Gets the state.

public NotificationContext.NotificationState State { get; }

Property Value

NotificationContext.NotificationState

The state.

SuppressNotifications

Gets the suppressed notifications.

public static NotificationContext SuppressNotifications { get; }

Property Value

NotificationContext

The suppressed notifications.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

To top