Class ModelParseContext
Denotes a parse context using model
public class ModelParseContext : ParseContext, IDisposable
- Inheritance
-
ModelParseContext
- Implements
- Inherited Members
Constructors
ModelParseContext(Grammar, Matcher, StringComparison)
Creates a new instance
public ModelParseContext(Grammar grammar, Matcher matcher, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)
Parameters
grammarGrammarthe grammar for this context
matcherMatcherthe matcher for the context
stringComparisonStringComparisonthe string comparison mode
ModelParseContext(Grammar, StringComparison)
Creates a new instance
public ModelParseContext(Grammar grammar, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)
Parameters
grammarGrammarthe grammar for this context
stringComparisonStringComparisonthe 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
TThe 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
contextElementobjectthe element in the context of which the string is resolved
inputstringthe textual reference
resolvedTthe resolved reference or the default
Returns
- bool
true, if the reference could be resolved, otherwise false
Type Parameters
T