Class StaticPattern<T1, T2>
- Namespace
- NMF.Transformations.Linq
- Assembly
- NMF.Transformations.dll
Denotes a static pattern used to generate inputs for transformation rules
public class StaticPattern<T1, T2> : ITransformationRulePattern<T1, T2>, ITransformationRulePattern, ITransformationPattern
Type Parameters
T1
The first argument type of the transformation rule
T2
The second argument tyoe of the transformation rule
- Inheritance
-
StaticPattern<T1, T2>
- Implements
-
ITransformationRulePattern<T1, T2>
- Inherited Members
Constructors
StaticPattern(Func<ITransformationContext, IEnumerable<Tuple<T1, T2>>>)
Creates a new instance
public StaticPattern(Func<ITransformationContext, IEnumerable<Tuple<T1, T2>>> selector)
Parameters
selector
Func<ITransformationContext, IEnumerable<Tuple<T1, T2>>>The function to select the input elements of the target transformation rule
Properties
Selector
The function to select the input elements of the target transformation rule
public Func<ITransformationContext, IEnumerable<Tuple<T1, T2>>> Selector { get; set; }
Property Value
- Func<ITransformationContext, IEnumerable<Tuple<T1, T2>>>
TargetRule
Gets or sets the transformation rule that is the target for the current transformation rule pattern
public GeneralTransformationRule<T1, T2> TargetRule { get; set; }
Property Value
- GeneralTransformationRule<T1, T2>
Methods
CreatePattern(ITransformationContext)
Applies the current pattern to the given transformation context
public ITransformationPatternContext CreatePattern(ITransformationContext context)
Parameters
context
ITransformationContextThe transformation context in which the pattern should be applied
Returns
- ITransformationPatternContext
A transformation pattern context object that represents the pattern within the given transformation context