Class ModelParseContext
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
Grammarthe grammar for this context
matcher
Matcherthe matcher for the context
stringComparison
StringComparisonthe string comparison mode
ModelParseContext(Grammar, StringComparison)
Creates a new instance
public ModelParseContext(Grammar grammar, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)
Parameters
grammar
Grammarthe grammar for this context
stringComparison
StringComparisonthe 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
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
objectthe element in the context of which the string is resolved
input
stringthe textual reference
resolved
Tthe resolved reference or the default
Returns
- bool
true, if the reference could be resolved, otherwise false
Type Parameters
T