Table of Contents

Class AddAssignReferenceRule<TSemanticElement, TReference>

Namespace
NMF.AnyText.Model
Assembly
NMF.AnyText.Core.dll

Denotes a rule that adds the value of an inner rule to a collection of the semantic element

public abstract class AddAssignReferenceRule<TSemanticElement, TReference> : ResolveRule<TSemanticElement, TReference>

Type Parameters

TSemanticElement

The type of the context element

TReference

The type of the property value

Inheritance
ResolveRule<TSemanticElement, TReference>
AddAssignReferenceRule<TSemanticElement, TReference>
Derived
Inherited Members

Properties

Feature

Gets the name of the feature that is assigned

protected abstract string Feature { get; }

Property Value

string

Methods

Apply(ParseContext, TSemanticElement, TReference)

Applies the given value to the provided context element

protected override void Apply(ParseContext context, TSemanticElement contextElement, TReference propertyValue)

Parameters

context ParseContext

the parse context in which this operation is performed

contextElement TSemanticElement

the element to which the value should be applied

propertyValue TReference

the value to apply

CanSynthesize(object, ParseContext, SynthesisPlan)

Determines whether the current rule can synthesize rule applications for the given semantic element

public override bool CanSynthesize(object semanticElement, ParseContext context, SynthesisPlan synthesisPlan)

Parameters

semanticElement object

the semantic element

context ParseContext

the context in which the rule is synthesized

synthesisPlan SynthesisPlan

the plan of the synthesis

Returns

bool

true, if a rule application can be synthesized, otherwise false

GetCollection(TSemanticElement, ParseContext)

Obtains the child collection

public abstract ICollection<TReference> GetCollection(TSemanticElement semanticElement, ParseContext context)

Parameters

semanticElement TSemanticElement

the semantic element

context ParseContext

the parse context in which the collection is obtained

Returns

ICollection<TReference>

a collection of values

Replace(ParseContext, TSemanticElement, TReference, TReference)

Replaces the provided old element with the provided new element

protected override void Replace(ParseContext context, TSemanticElement contextElement, TReference oldValue, TReference newValue)

Parameters

context ParseContext

the parse context in which this operation is performed

contextElement TSemanticElement

the element to which the value should be applied

oldValue TReference

the old value

newValue TReference

the value to apply

Synthesize(object, ParsePosition, ParseContext)

Synthesizes a rule application for the given semantic element

public override RuleApplication Synthesize(object semanticElement, ParsePosition position, ParseContext context)

Parameters

semanticElement object
position ParsePosition

the parse position at which the element should be synthesized

context ParseContext

the parse context

Returns

RuleApplication

a rule application

Unapply(ParseContext, TSemanticElement, TReference)

Unapplies the given value to the provided context element

protected override void Unapply(ParseContext context, TSemanticElement contextElement, TReference propertyValue)

Parameters

context ParseContext

the parse context in which this operation is performed

contextElement TSemanticElement

the element to which the value should be unapplied

propertyValue TReference

the value to unapply