Show / Hide Table of Contents

Class TemplateFactory<TTuple>

Provides a base-class for delegate based factories.

Inheritance
Object
TemplateFactory<TTuple>
ActionFactory<TTuple>
FuncFactory<TTuple, TResult>
TaskActionFactory<TTuple>
TaskFuncFactory<TTuple, TResult>
TesterFuncFactory<TTuple, TResult, TSuccess>
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public abstract class TemplateFactory<TTuple>

    where TTuple : Template
Type Parameters
Name Description
TTuple

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

Constructors

| Improve this Doc View Source

TemplateFactory(TTuple, Boolean)

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

Declaration
protected TemplateFactory(TTuple tuple, bool hasDelegate)
Parameters
Type Name Description
TTuple tuple

Then-tuple representation of a Template.

Boolean hasDelegate

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

Properties

| Improve this Doc View Source

DelegateInfo

Gets the method represented by the delegate.

Declaration
public virtual MethodInfo DelegateInfo { get; protected set; }
Property Value
Type Description
MethodInfo

A MethodInfo describing the method represented by the delegate.

| Improve this Doc View Source

GenericArguments

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

Declaration
public TTuple GenericArguments { get; }
Property Value
Type Description
TTuple

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

| Improve this Doc View Source

HasDelegate

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

Declaration
public virtual bool HasDelegate { get; }
Property Value
Type Description
Boolean

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

Methods

| Improve this Doc View Source

Clone()

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

Declaration
public abstract TemplateFactory<TTuple> Clone()
Returns
Type Description
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.

| Improve this Doc View Source

ThrowIfNoValidDelegate(Boolean)

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

Declaration
protected void ThrowIfNoValidDelegate(bool delegateIsNull)
Parameters
Type Name Description
Boolean delegateIsNull

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

Exceptions
Type Condition
InvalidOperationException

No delegate was specified on the factory.

| Improve this Doc View Source

ToString()

Returns a String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
String

A String that represents this instance.

Overrides
Object.ToString()
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX