Class SimpleHandler<THandler, TArgs>
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
THandlerTArgs
- Inheritance
-
objectSimpleHandler<THandler, TArgs>
- Derived
- Inherited Members
- Extension Methods
Constructors
SimpleHandler()
protected SimpleHandler()
Properties
EventArguments
Handler arguments
[Obsolete("Property is no longer used by the system and will be removed.")]
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
eTArgsEvent arguments
SetParent(AbstractHandler)
Sets the parent event of the event
public override void SetParent(AbstractHandler parent)
Parameters
parentAbstractHandlerNew parent event
Start(TArgs)
Invokes the registered Execute event handlers.
public void Start(TArgs e)
Parameters
eTArgsArguments 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
eTArgsEvent arguments
Returns
- TArgs
Events
Execute
Registered event handlers.
public event EventHandler<TArgs> Execute
Event Type
- EventHandler<TArgs>