Table of Contents

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

TTuple

The type of the n-tuple representation of a MutableTuple.

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.

Inheritance
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

method TesterFunc<TTuple, TResult, TSuccess>

The tester function delegate to invoke.

tuple TTuple

The 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

method TesterFunc<TTuple, TResult, TSuccess>

The tester function delegate to invoke.

tuple TTuple

The n-tuple argument of method.

originalDelegate Delegate

The original delegate wrapped by method.

Properties

DelegateInfo

Gets the method represented by the tester function delegate.

public sealed override 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

Boolean

true if 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

result TResult

The 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.