Class TemplateFactory<TTuple>
Provides a base-class for delegate based factories.
Inheritance
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 SourceTemplateFactory(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 |
|
Properties
| Improve this Doc View SourceDelegateInfo
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. |
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. |
HasDelegate
Gets a value indicating whether this instance has an assigned delegate.
Declaration
public virtual bool HasDelegate { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Methods
| Improve this Doc View SourceClone()
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.
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 |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | No delegate was specified on the factory. |
ToString()
Returns a String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |