Interface IChangeNotificationManager

The IEventManager manages all IChangeProcessor instances in an application context.

Inherited Members
System.IDisposable.Dispose()
Namespace: EPiServer.Events.ChangeNotification
Assembly: EPiServer.Events.dll
Version: 8.11.0
Syntax
public interface IChangeNotificationManager : IDisposable

Methods

GetProcessorInfo()

Gets the status of all processors managed by this instance.

Declaration
IEnumerable<IChangeProcessorInfo> GetProcessorInfo()
Returns
Type Description
System.Collections.Generic.IEnumerable<IChangeProcessorInfo>

An enumerable of IChangeProcessorInfo objects describing the status of each processor.

NotifyChange<TChangedData>(TChangedData, TChangedData)

Notifies the system of a data change.

Declaration
void NotifyChange<TChangedData>(TChangedData before, TChangedData after)

    where TChangedData : class
Parameters
Type Name Description
TChangedData before

The changed data object, as it was before the change; or null for inserts.

TChangedData after

The changed data object, as it was after the change; or null for deletes.

Type Parameters
Name Description
TChangedData

The type of data that was changed.

Remarks

This should be called only after any transaction changing the data has been fully completed, and should not access data except what is contained in the arguments. This ensures that a change that will not get committed will not be evaluated; and that only the specified change, and no later changes, are evaluated.

No specific use case is defined for calling this method with two null parameters, but such a call will return without exception.

NotifyChanges<TChangedData>(IEnumerable<IBulkChangeItem<TChangedData>>)

Notifies the system of multiple data changes. This has the same behavior as calling on each element of changes, but may be more efficient for large sets of data.

Declaration
void NotifyChanges<TChangedData>(IEnumerable<IBulkChangeItem<TChangedData>> changes)

    where TChangedData : class
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IBulkChangeItem<TChangedData>> changes

Before and after views of each change.

Type Parameters
Name Description
TChangedData

The type of data that was changed.

Start()

Starts processing of events and enables status queries and recovery, if not already started.

Declaration
void Start()

Stop(TimeSpan)

Cancels any running tasks and releases resources, waiting for all tasks to complete for up to the timeout interval.

Declaration
bool Stop(TimeSpan timeout)
Parameters
Type Name Description
System.TimeSpan timeout

The maximum time to wait for tasks to complete, or -1 milliseconds to wait indefinitely.

Returns
Type Description
System.Boolean

True if all tasks completed before the timeout elapsed.

Remarks

The object does not need to be disposed if Stop has been called.

TryStartRecoveryAll()

Starts tasks to recover all processors that are invalid.

Declaration
void TryStartRecoveryAll()

Extension Methods