Class RoslynRepository
- Namespace
- Alternet.Syntax.Parsers.Roslyn.CodeCompletion
- Assembly
- Alternet.Syntax.Parsers.Roslyn.v9.dll
Represents properties and methods to perform code completion functionality intended to use for Roslyn supported languages.
public class RoslynRepository : CodeCompletionRepository, IRoslynRepository, ICodeCompletionRepository, IDisposable, IUpdate
- Inheritance
-
RoslynRepository
- Implements
- Derived
Constructors
- RoslynRepository(ISyntaxParser, IRoslynSolution, bool)
Initializes a new instance of the
RoslynRepository
class with specified settings.
Properties
- AlphaImages
Represents collection of alpha images used for code completion.
- AlphaImagesHighDpi
Gets Alpha ImageList attached to this
CodeCompletionRepository
for high DPI.
- Document
Represents a
Microsoft.CodeAnalysis.Document
contains code text.
- DocumentId
Represents a
Microsoft.CodeAnalysis.DocumentId
contains code text.
- Images
Represents collection of images used for code completion.
- ImagesHighDpi
Gets ImageList attached to this
CodeCompletionRepository
for high DPI.
- Model
Represents a
Microsoft.CodeAnalysis.SemanticModel
describes code text.
- ProjectId
Represents a
Microsoft.CodeAnalysis.ProjectId
that contains document.
- ProjectName
Gets or sets Project name containing document.
- Solution
Gets RoslynSolution associated with this Repository.
- Text
Represents a
Microsoft.CodeAnalysis.SourceText
describes code text.
- Tree
Represents a
Microsoft.CodeAnalysis.SyntaxTree
represents parsed code text.
- UpdateCount
Keeps track of calls to
BeginUpdate
andEndUpdate
so that they can be nested.
Methods
- AddDocument(string, SourceText)
Adds a new document or replaces existing document with specified settings.
- AddDocument(string, string)
Adds a new document or replaces existing document with specified settings.
- AddFileReference(string)
Adds metadata reference to the project
- AddImageReference(byte[])
Adds metadata reference to the project
- AddReference(MetadataReference)
Adds metadata reference to the project
- BeginUpdate()
WPrevents object state updating until calling
EndUpdate
method.
- CloseDocument()
Closes document which was opened in roslyn workspace.
- CodeCompletionAsync(Point, CodeCompletionArgs, CancellationToken)
Performs code completion for the specified text representing language element.
- DisableUpdate()
Prevents object state updating until calling
EnableUpdate
method.
- EnableUpdate()
Re-enables object state updating, that was turn of by calling
DisableUpdate
method. Using DisableUpdate/EnableUpdate to prevent notifying about updating the object state.
- EndUpdate()
Re-enables object state updating, that was turn of by calling
BeginUpdate
method.
- FindDeclaration(SemanticModel, Point, bool)
When implemented by a class, finds the declaration node at given position.
- FindImplementations(ISymbol, CancellationToken)
Finds the symbols that implement an interface or interface member.
- FindReferencesAsync(ISymbol, bool, CancellationToken)
Locates all references to the symbol in the text.
- GetBreakpointStatementAtPosition(Point)
Gets breakpoint statement range at pecified 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.
- GetCodeSnippets(string)
Returns code snippets for the given language.
- GetDeclarationAt(Point)
Gets
IRange
that corresponds to declaration at the specified position.
- GetDiagnostics()
Get all the errors within the syntax tree associated with this object.
- GetModel(out SemanticModel, out SyntaxTree)
Gets the semantic model and syntax tree for this document.
- GetNodeAt(Point)
Gets
Microsoft.CodeAnalysis.SyntaxNode
at specified position.
- GetNodeAt(int)
Gets
Microsoft.CodeAnalysis.SyntaxNode
at specified line.
- GetPosFromPosition(SourceText, Point)
Converts given position into absolute text coordinate.
- GetPositionFromPos(SourceText, int)
Converts given pos into
Point
coordinate.
- GetRangeAt(Point)
Gets
IRange
that contains given position.
- GetRangeAt(Point, IList<IRange>)
Gets
IRange
that contains given position.
- GetSmartIndent(int, bool, bool, int)
Returns indentation string for specified line.
- GetXmlComment()
Represents beginning of XML comment.
- HasCodeFixesAsync(ISyntaxError, bool, CancellationToken)
Determines if any code fixes are available for the given syntax error in async mode.
- HasCodeRefactorsAsync(Point, Point, bool, CancellationToken)
Determines if any code refactors are available at the given range in async mode.
- IsCollapsible(SyntaxNode, out string, out TextSpan, bool)
Indicates whether specified
Microsoft.CodeAnalysis.SyntaxNode
can be outlined.
- IsCollapsible(IEnumerable<SyntaxTrivia>, out string, out TextSpan)
Indicates whether specified
Microsoft.CodeAnalysis.SyntaxTrivia
list can be outlined.
- IsContentDivider(SyntaxNode, out TextSpan)
Gets boolean value indicating whether text content is divided at given line.
- IsStructureGuideNode(SyntaxNode, out TextSpan)
Indicates whether specified
Microsoft.CodeAnalysis.SyntaxNode
is guide node.
- 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.
- RegisterAssemblies(string[])
Registers assemblies in the project.
- RegisterAssembly(string)
Registers assembly in the project.
- RegisterCode(string, string)
Makes types declared in given source file accessible for code analysis.
- RegisterCodeFiles(string[])
Makes types declared in given source files accessible for code analysis.
- RegisterDefaultAssemblies(TechnologyEnvironment, bool, bool)
Registers default assemblies in the project.
- RegisterDefaultNamespaces(TechnologyEnvironment)
Registers default namespaces in the project.
- RegisterNamespaces(string[], string)
Registers global namespaces in the project.
- RemoveDocument()
Removes document from document collection.
- RemoveDocument(DocumentId)
Removes current document from document collection.
- RemoveDocument(string)
Removes document from document collection.
- ReplaceDocument(DocumentId, SourceText)
Adds a new document or replaces existing document with specified settings.
- ReplaceDocument(DocumentId, string)
Adds a new document or replaces existing document with specified settings.
- SmartCapitalize(Point, Point, ITextUndoList)
Capitalizes block of text.
- SmartFormat(ref Point, bool, int, ITextUndoList)
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.
- UnregisterAssemblies(string[])
Unregisters assemblies from the project.
- UnregisterAssembly(string)
Unregisters assembly from the project.
- UnregisterCode(string)
Removes types declared in given source file from being accessible for code analysis.
- UnregisterCodeFiles(string[])
Removes types declared in given source files from being accessible for code analysis.
- Update()
Updates an object state.
Events
- CustomFormattingOptions
Occurs when text document is being formatted to provide custom formatting options.