Table of Contents

Class ModelParseContext

Namespace
NMF.AnyText
Assembly
NMF.AnyText.dll

Denotes a parse context using model

public class ModelParseContext : ParseContext
Inheritance
ModelParseContext
Inherited Members

Constructors

ModelParseContext(Grammar, Matcher, StringComparison)

Creates a new instance

public ModelParseContext(Grammar grammar, Matcher matcher, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)

Parameters

grammar Grammar

the grammar for this context

matcher Matcher

the matcher for the context

stringComparison StringComparison

the string comparison mode

ModelParseContext(Grammar, StringComparison)

Creates a new instance

public ModelParseContext(Grammar grammar, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)

Parameters

grammar Grammar

the grammar for this context

stringComparison StringComparison

the string comparison mode

Methods

GetPotentialReferences<T>(object, string)

Retrieves all potential references for a given context element.

public override IEnumerable<T> GetPotentialReferences<T>(object contextElement, string input)

Parameters

contextElement object

The context element.

input string

The input from the user

Returns

IEnumerable<T>

A collection of references.

Type Parameters

T

The type of references to retrieve.

TryResolveReference<T>(object, string, out T)

Resolves the given input

public override bool TryResolveReference<T>(object contextElement, string input, out T resolved)

Parameters

contextElement object

the element in the context of which the string is resolved

input string

the textual reference

resolved T

the resolved reference or the default

Returns

bool

true, if the reference could be resolved, otherwise false

Type Parameters

T