Class TesterFuncFactory<TTuple, TResult, TSuccess>
Provides an easy way of invoking an TesterFunc<TResult, TSuccess> function delegate regardless of the amount of parameters provided.
Inherited Members
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class TesterFuncFactory<TTuple, TResult, TSuccess> : TemplateFactory<TTuple> where TTuple : Template
Type Parameters
Name | Description |
---|---|
TTuple | The type of the n-tuple representation of a Template. |
TResult | The type of the out result value of the tester function delegate Method. |
TSuccess | The type of the return value that indicates success of the tester function delegate Method. |
Constructors
| Improve this DocTesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess>, TTuple)
Initializes a new instance of the TesterFuncFactory<TTuple, TResult, TSuccess> class.
Declaration
public TesterFuncFactory(TesterFunc<TTuple, TResult, TSuccess> method, TTuple tuple)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<TTuple, TResult, TSuccess> | method | The tester function delegate to invoke. |
TTuple | tuple | The n-tuple argument of |
Properties
| Improve this DocDelegateInfo
Gets the method represented by the tester function delegate.
Declaration
public override MethodInfo DelegateInfo { get; }
Property Value
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo describing the method represented by the tester function delegate. |
Overrides
HasDelegate
Gets a value indicating whether this instance has an assigned tester function delegate.
Declaration
public override bool HasDelegate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
Method
Gets the tester function delegate to invoke.
Declaration
protected TesterFunc<TTuple, TResult, TSuccess> Method { get; }
Property Value
Type | Description |
---|---|
TesterFunc<TTuple, TResult, TSuccess> | The TesterFunc<TResult, TSuccess> delegate to invoke. |
Methods
| Improve this DocClone()
Creates a shallow copy of the current TesterFuncFactory<TTuple, TResult, TSuccess> object.
Declaration
public TesterFuncFactory<TTuple, TResult, TSuccess> Clone()
Returns
Type | Description |
---|---|
TesterFuncFactory<TTuple, TResult, TSuccess> | 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.
Declaration
public virtual TSuccess ExecuteMethod(out TResult result)
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The out result value of the tester function delegate. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the tester function delegate associated with this instance. |