Table of Contents

Class SimpleHandler<THandler, TArgs>

Namespace
CMS.Base
Assembly
CMS.Base.dll

Represents an event invoking the registered Execute handlers.

public abstract class SimpleHandler<THandler, TArgs> : AbstractHandler where THandler : SimpleHandler<THandler, TArgs>, new() where TArgs : EventArgs

Type Parameters

THandler
TArgs
Inheritance
object
SimpleHandler<THandler, TArgs>
Derived
Inherited Members
Extension Methods

Properties

EventArguments

Handler arguments

[Obsolete("Property is no longer used by the system and will be removed.")]
[ObsoleteSince(30, 2)]
public TArgs EventArguments { get; protected set; }

Property Value

TArgs

IsBound

Returns true if the handler has some events bound

public bool IsBound { get; }

Property Value

bool

Parent

Parent handler

public THandler Parent { get; set; }

Property Value

THandler

Methods

Clear()

Clears all bound event handlers from the event and resets the number of executions of the event

public override void Clear()

RaiseExecute(TArgs)

Raises the execute event

protected virtual void RaiseExecute(TArgs e)

Parameters

e TArgs

Event arguments

SetParent(AbstractHandler)

Sets the parent event of the event

public override void SetParent(AbstractHandler parent)

Parameters

parent AbstractHandler

New parent event

Start(TArgs)

Invokes the registered Execute event handlers.

public void Start(TArgs e)

Parameters

e TArgs

Arguments to be passed to registered event handlers.

Exceptions

NotSupportedException

Thrown when the event is a one-time only event and has already been invoked.

StartEvent(TArgs)

Initiates the new handler context

[Obsolete("Use Start(TArgs) instead.")]
public TArgs StartEvent(TArgs e)

Parameters

e TArgs

Event arguments

Returns

TArgs

Events

Execute

Registered event handlers.

public event EventHandler<TArgs> Execute

Event Type

EventHandler<TArgs>