Class ActionFactory<TTuple>
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Provides a way of invoking an Action delegate regardless of the amount of parameters provided.
public sealed class ActionFactory<TTuple> : MutableTupleFactory<TTuple> where TTuple : MutableTuple
Type Parameters
TTuple
The type of the n-tuple representation of a MutableTuple.
- Inheritance
-
MutableTupleFactory<TTuple>ActionFactory<TTuple>
- Inherited Members
Constructors
ActionFactory(Action<TTuple>, TTuple)
Initializes a new instance of the ActionFactory<TTuple> class.
public ActionFactory(Action<TTuple> method, TTuple tuple)
Parameters
method
Action<TTuple>The delegate to invoke.
tuple
TTupleThe n-tuple argument of
method
.
ActionFactory(Action<TTuple>, TTuple, Delegate)
Initializes a new instance of the ActionFactory<TTuple> class.
public ActionFactory(Action<TTuple> method, TTuple tuple, Delegate originalDelegate)
Parameters
method
Action<TTuple>The delegate to invoke.
tuple
TTupleThe n-tuple argument of
method
.originalDelegate
DelegateThe original delegate wrapped by
method
.
Methods
Clone()
Creates a shallow copy of the current ActionFactory<TTuple> object.
public override MutableTupleFactory<TTuple> Clone()
Returns
- MutableTupleFactory<TTuple>
A new ActionFactory<TTuple> that is a copy of this instance.
Remarks
When thread safety is required this is the method to invoke.
ExecuteMethod()
Executes the delegate associated with this instance.
public void ExecuteMethod()