Table of Contents

Class AsyncEvent<TData>

Namespace
CMS.Base
Assembly
CMS.Base.dll

Base class for asynchronous events that carry strongly-typed business data.

public abstract class AsyncEvent<TData> : IAsyncEvent where TData : class, new()

Type Parameters

TData

The type containing the event's business data.

Inheritance
object
AsyncEvent<TData>
Implements
Derived
Extension Methods

Remarks

This class provides the foundation for events that need to carry event-specific business data through the Data property. Use this base class for simple events that don't require cross-handler state sharing.

For compound events (before/after pairs) that need to share state between handlers, use CompoundAsyncEvent<TData> instead.

Constructors

AsyncEvent()

Initializes a new instance of the AsyncEvent<TData> class.

protected AsyncEvent()

Remarks

This constructor should be used only in testing scenarios.

AsyncEvent(TData)

Initializes a new instance of the AsyncEvent<TData> class with the specified properties.

protected AsyncEvent(TData data)

Parameters

data TData

The event's business data. Cannot be null.

Exceptions

ArgumentNullException

Thrown when data is null.

Properties

Data

Gets the event's business data.

public TData Data { get; }

Property Value

TData

Remarks

Contains the data associated with the event. The data may be read-only or mutable depending on the TData implementation.

See Also