Class RoslynParser
Represents properties and methods to perform syntax analysis of the text intended to use for Roslyn supported languages.
public class RoslynParser : SyntaxParser, IComponent, IDisposable, ISyntaxParser, IParser, ILexer, INotify, IUpdate, IImport
- Inheritance
-
RoslynParser
- Implements
- Derived
Constructors
- RoslynParser(IRoslynSolution)
Initializes a new instance of the
RoslynParser
class with specifiedIRoslynSolution
.
Properties
- FileName
Gets or sets file name of the file being parsed.
- ProjectName
Gets or sets a string specifying the name of the project to which the given code corresponds.
- Repository
Gets an
IRoslynRepository
that holds methods for code completion purposes.
- SourceTextContainer
Gets or sets the
RoslynTextContainer
used to hold and update source code text.
- Strings
Gets or sets a list of strings to parse.
Methods
- CodeCompletion(string, StringItemInfo[], Point, CodeCompletionArgs)
Performs code completion for the specified text representing language element.
- CreateRepository()
Creates
ICodeCompletionRepository
to perform code completion functionality for this parser.
- DoCodeCompletion(Point, CodeCompletionArgs, CancellationToken, bool)
Performs code completion for the specified text representing language element.
- FindCodeActions(Point, Point, Point, ISyntaxError, bool)
Locates and highlights available code fixes and code refactors for given position in the texts.
- FindDeclaration(Point)
Finds the declaration node at given position.
- FindDeclaration(string, Point)
Finds the declaration node at given position.
- FindImplementations(Point, IRangeList, bool)
Finds the symbols that implement an interface or interface member.
- FindReferences(Point)
Locates and highlights references at given position in the text.
- FindReferences(Point, IRangeList, bool)
Locates declaration at given position and finds all references to this declaration in the text.
- FindReferencesAsync(Point, IRangeList, bool, CancellationToken)
Locates declaration at given position and finds all references to this declaration in the text.
- ForceReparseText(bool)
Force text reparsing.
- ForceReparseTextAsync(bool, CancellationToken)
Force text reparsing asynchronously.
- GetActiveStatementAt(Point)
Gets
IRange
that corresponds to the statement at specified position.
- GetCodeFixesAsync(ISyntaxError, bool, CancellationToken)
Retrieves all code fixes available for the given syntax error in async mode.
- GetCodeRefactorsAsync(Point, Point, bool, CancellationToken)
Retrieves all applicable refactors at given range in async mode.
- GetCompletionType(char)
Obtains type of code completion window from specifies
char
parameter.
- GetContentDividers(IList<int>)
Gets list of content dividers.
- GetDeclarationAt(Point)
Gets
IRange
that corresponds to the declafration at specified position.
- GetRangeAt(Point)
Gets
IRange
that contains given position.
- GetRangeAt(Point, IList<IRange>)
Gets
IRange
that contains given position.
- GetSmartIndentString(int, bool, bool, int)
Returns indentation string for specified line.
- GetStructureGuideLines(IList<IRange>)
Gets list of guide lines.
- GetSyntaxErrors(IList<ISyntaxError>)
Retrieves all syntax errors found while analyzing the text.
- HasCodeFixesAsync(ISyntaxError, bool, CancellationToken)
Determines if code fixes are available for a given syntax error in async mode.
- HasCodeRefactorsAsync(Point, Point, bool, CancellationToken)
Determines if code fixes are available for a given syntax error in async mode.
- IsCodeCompletionChar(char, byte, ref int)
Returns boolean value indicating that given character initializes a code completion procedure when typing.
- LoadFile(string, Encoding)
Loads the contents of the specified file with specified encoding.
- OnTextChanged(ITextUndo)
Responds to incremental change of the text in the editor.
- Outline(IList<IRange>)
Creates outlined sections for parsed text using result of syntax analysis and fills ranges parameter by the collection of the outlined sections.
- ParseSemanticAsync(Document, CancellationToken)
Performs asynchronous semantic analysis of specified document.
- ParseSyntaxAsync(Document, int, int, CancellationToken)
Performs asynchronous syntax analysis of specified document.
- ParseText(int, int, string, ref StringItemInfo[])
Performs lexical analysis of given text.
- PositionChanged(int, int, int, int)
Changes positions of any syntax nodes and its elements located next to the specified position.
- Prepare(string, IStringList, ISyntaxTree, bool, PrepareReason)
Sets lines to parse.
- ProcessAutoComplete(string, Point, out string)
Checks whether end-of-block code needs inserting.
- ProcessSnippetBody(string, Point, out string)
Checks whether snippet body code needs inserting.
- ReparseText()
Reparses entire text.
- ReparseText(bool)
Reparses entire text.
Specifies whether parser should perform the task in the separate thread
- ReparseText(bool, int, int)
Reparses entire text.
Specifies whether parser should perform the task in the separate thread Specifies first changed line in the source text. Specifies last changed line in the source text.
- ResetOptions()
Resets
Options
to the default value.
- ResetParseInterval()
Resets
ParseInterval
to the default value.
- ShouldSerializeOptions()
Indicates whether the
Options
property should be persisted.
- ShouldSerializeParseInterval()
Indicates whether the
ParseInterval
property should be persisted.
- SmartFormat(ref Point, bool, int, ITextUndoList, string)
Formats block of text according to the parser rules.
- SmartFormat(ref Point, ref Point, bool, int, bool, ITextUndoList)
Formats block of text according to the parser rules.
- StartParsing(string, int, int)
Prepares parser to parse the specified range of the text.
- StopParsing()
Aborts parsing process.
- SupportsAsyncParsing()
Indicates whether parser supports async parsing.
- SupportsTextChanges()
Indicates whether parser supports incremental text changes.