Class TesterFuncFactory<TTuple, TResult, TSuccess>
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Provides a way of invoking an TesterFunc<TResult, TSuccess> function delegate regardless of the amount of parameters provided.
public class TesterFuncFactory<TTuple, TResult, TSuccess> : MutableTupleFactory<TTuple> where TTuple : MutableTuple
Type Parameters
TTupleThe type of the n-tuple representation of a MutableTuple.
TResultThe type of the out result value of the tester function delegate Method.
TSuccessThe type of the return value that indicates success of the tester function delegate Method.
- Inheritance
-
MutableTupleFactory<TTuple>TesterFuncFactory<TTuple, TResult, TSuccess>
- Inherited Members
Constructors
TesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess>, TTuple)
Initializes a new instance of the TesterFuncFactory<TTuple, TResult, TSuccess> class.
public TesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess> method, TTuple tuple)
Parameters
methodTesterFunc<TTuple, TResult, TSuccess>The tester function delegate to invoke.
tupleTTupleThe n-tuple argument of
method.
TesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess>, TTuple, Delegate)
Initializes a new instance of the TesterFuncFactory<TTuple, TResult, TSuccess> class.
public TesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess> method, TTuple tuple, Delegate originalDelegate)
Parameters
methodTesterFunc<TTuple, TResult, TSuccess>The tester function delegate to invoke.
tupleTTupleThe n-tuple argument of
method.originalDelegateDelegateThe original delegate wrapped by
method.
Properties
DelegateInfo
Gets the method represented by the tester function delegate.
public override sealed MethodInfo DelegateInfo { get; }
Property Value
- MethodInfo
A MethodInfo describing the method represented by the tester function delegate.
HasDelegate
Gets a value indicating whether this instance has an assigned tester function delegate.
public override bool HasDelegate { get; }
Property Value
- bool
trueif this instance an assigned tester function delegate; otherwise,false.
Method
Gets the tester function delegate to invoke.
protected TesterFunc<TTuple, TResult, TSuccess> Method { get; }
Property Value
- TesterFunc<TTuple, TResult, TSuccess>
The TesterFunc<TResult, TSuccess> delegate to invoke.
Methods
Clone()
Creates a shallow copy of the current TesterFuncFactory<TTuple, TResult, TSuccess> object.
public override MutableTupleFactory<TTuple> Clone()
Returns
- MutableTupleFactory<TTuple>
A new TesterFuncFactory<TTuple, TResult, TSuccess> that is a copy of this instance.
Remarks
When thread safety is required this is the method to invoke.
ExecuteMethod(out TResult)
Executes the tester function delegate associated with this instance.
public virtual TSuccess ExecuteMethod(out TResult result)
Parameters
resultTResultThe out result value of the tester function delegate.
Returns
- TSuccess
The return value that indicates success of the tester function delegate associated with this instance.