Table of Contents

Class TemplateFactory<TTuple>

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Provides a base-class for delegate based factories.

public abstract class TemplateFactory<TTuple>
    where TTuple : Template

Type Parameters

TTuple

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

Inheritance
Object
TemplateFactory<TTuple>
Derived

Constructors

TemplateFactory(TTuple, Boolean)

Initializes a new instance of the TemplateFactory<TTuple> class.

protected TemplateFactory(TTuple tuple, bool hasDelegate)

Parameters

tuple TTuple

Then-tuple representation of a Template.

hasDelegate Boolean

true if this instance has a valid delegate; otherwise, false.

Properties

DelegateInfo

Gets the method represented by the delegate.

public virtual MethodInfo DelegateInfo { get; protected set; }

Property Value

MethodInfo

A System.Reflection.MethodInfo describing the method represented by the delegate.

GenericArguments

Gets a n-tuple representation of a Template that represents the generic arguments passed to this instance.

public TTuple GenericArguments { get; }

Property Value

TTuple

The n-tuple representation of a Template that represents the generic arguments passed to this instance.

HasDelegate

Gets a value indicating whether this instance has an assigned delegate.

public virtual bool HasDelegate { get; }

Property Value

Boolean

true if this instance an assigned delegate; otherwise, false.

Methods

Clone()

Creates a shallow copy of the current TemplateFactory<TTuple> object.

public abstract TemplateFactory<TTuple> Clone()

Returns

TemplateFactory<TTuple>

A new TemplateFactory<TTuple> implementation that is a copy of this instance.

Remarks

When thread safety is required this is the method to invoke.

ThrowIfNoValidDelegate(Boolean)

Validates and throws an System.InvalidOperationException if this instance has no valid delegate.

protected void ThrowIfNoValidDelegate(bool delegateIsNull)

Parameters

delegateIsNull Boolean

The value of a condition that can be either true or false.

Exceptions

System.InvalidOperationException

No delegate was specified on the factory.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

String

A System.String that represents this instance.