Interface IRoslynRepository
public interface IRoslynRepository : ICodeCompletionRepository, IDisposable, IUpdate
Properties
- Document
When implemented by a class, represents a
Microsoft.CodeAnalysis.Document
that contains code text.
- DocumentId
When implemented by a class, represents a
Microsoft.CodeAnalysis.DocumentId
that contains code text.
- Model
When implemented by a class, gets SemanticModel associated with this Repository.
- ProjectId
When implemented by a class, represents a
Microsoft.CodeAnalysis.ProjectId
that contains document.
- ProjectName
When implemented by a class, gets or sets Project name containing document
- Solution
When implemented by a class, gets RoslynSolution associated with this Repository.
- Text
When implemented by a class, gets SourceText associated with this Repository.
- Tree
When implemented by a class, gets SyntaxTree associated with this Repository.
Methods
- AddDocument(string, SourceText)
When implemented by a class, adds a new document or replaces existing document with specified settings.
- AddDocument(string, string)
When implemented by a class, adds a new document or replaces existing document with specified settings.
- AddFileReference(string)
When implemented by a class, adds metadata reference to the project
- AddImageReference(byte[])
When implemented by a class, adds metadata reference to the project
- AddReference(MetadataReference)
When implemented by a class, adds metadata reference to the project
- CloseDocument()
When implemented by a class, closes document which was opened in roslyn workspace.
- CodeCompletionAsync(Point, CodeCompletionArgs, CancellationToken)
When implemented by a class, performs code completion for the specified text representing language element.
- FindDeclaration(SemanticModel, Point, bool)
When implemented by a class, finds the declaration node at given position.
- FindImplementations(ISymbol, CancellationToken)
When implemented by a class, finds the symbols that implement an interface or interface member.
- FindReferencesAsync(ISymbol, bool, CancellationToken)
When implemented by a class, locates all references to the symbol in the text.
- GetBreakpointStatementAtPosition(Point)
When implemented by a class, gets breakpoint statement range at pecified position.
- GetCodeFixesAsync(ISyntaxError, bool, CancellationToken)
When implemented by a class, retrieves all code fixes available for the given syntax error in async mode.
- GetCodeRefactorsAsync(Point, Point, bool, CancellationToken)
When implemented by a class, retrieves all applicable refactors at given range in async mode.
- GetDeclarationAt(Point)
When implemented by a class, gets
IRange
that corresponds to declaration at the specified position.
- GetDiagnostics()
When implemented by a class, get all the errors within the syntax tree associated with this object.
- GetModel(out SemanticModel, out SyntaxTree)
When implemented by a class, gets the current semantic model and syntax tree for this document.
- GetNodeAt(Point)
When implemented by a class, gets
SyntaxNode
that corresponds to the specified position.
- GetNodeAt(int)
implemented by a class, gets
Microsoft.CodeAnalysis.SyntaxNode
at specified line.
- GetPosFromPosition(SourceText, Point)
When implemented by a class, converts given position into absolute text coordinate.
- GetPositionFromPos(SourceText, int)
When implemented by a class, converts given pos into
Point
coordinate.
- GetRangeAt(Point)
When implemented by a class, gets
IRange
that corresponds to the specified position.
- GetRangeAt(Point, IList<IRange>)
When implemented by a class, gets
IRange
that contains given position.
- GetSmartIndent(int, bool, bool, int)
When implemented by a class, returns indentation string for specified line.
- GetXmlComment()
When implemented by a class, represents beginning of XML comment.
- HasCodeFixesAsync(ISyntaxError, bool, CancellationToken)
When implemented by a class, determines if any code fixes are available for the given syntax error in async mode.
- HasCodeRefactorsAsync(Point, Point, bool, CancellationToken)
When implemented by a class, determines if any code refactors are available at the given range in async mode.
- IsCollapsible(SyntaxNode, out string, out TextSpan, bool)
When implemented by a class, indicates whether specified
Microsoft.CodeAnalysis.SyntaxNode
can be outlined.
- IsCollapsible(IEnumerable<SyntaxTrivia>, out string, out TextSpan)
When implemented by a class, indicates whether specified
Microsoft.CodeAnalysis.SyntaxTrivia
list can be outlined.
- IsContentDivider(SyntaxNode, out TextSpan)
When implemented by a class, gets boolean value indicating whether text content is divided at given node.
- IsStructureGuideNode(SyntaxNode, out TextSpan)
When implemented by a class, indicates whether specified
Microsoft.CodeAnalysis.SyntaxNode
is guide node.
- ProcessAutoComplete(string, Point, out string)
When implemented by a class, checks whether end-of-block code needs inserting.
- ProcessSnippetBody(string, Point, out string)
When implemented by a class, checks whether snippet body code needs inserting.
- RegisterAssemblies(string[])
When implemented by a class, registers assemblies in the project.
- RegisterAssembly(string)
When implemented by a class, registers assembly in the project.
- RegisterCode(string, string)
When implemented by a class, makes types declared in given source file accessible for code analysis.
- RegisterCodeFiles(string[])
When implemented by a class, makes types declared in given source files accessible for code analysis.
- RegisterDefaultAssemblies(TechnologyEnvironment, bool, bool)
When implemented by a class, registers default assemblies in the project.
- RegisterDefaultNamespaces(TechnologyEnvironment)
When implemented by a class, registers default namespaces in the project.
- RegisterNamespaces(string[], string)
When implemented by a class, registers global namespaces in the project.
- RemoveDocument()
Removes current document from document collection.
- RemoveDocument(DocumentId)
When implemented by a class, removes document from document collection.
- RemoveDocument(string)
When implemented by a class, removes document from document collection.
- ReplaceDocument(DocumentId, SourceText)
When implemented by a class, adds a new document or replaces existing document with specified settings.
- ReplaceDocument(DocumentId, string)
When implemented by a class, adds a new document or replaces existing document with specified settings.
- SmartFormat(ref Point, bool, int, ITextUndoList)
When implemented by a class, formats block of text according to the parser rules.
Position of the text Indicates whether indentation string should contain spaces or tabs Specifies number of spaces in tab List of changes.
- SmartFormat(ref Point, ref Point, bool, int, bool, ITextUndoList)
When implemented by a class, formats block of text according to the parser rules.
Start position of the block End position of the block Indicates whether indentation string should contain spaces or tabs Specifies number of spaces in tab Specifies if whole syntax block containing start and end point should be formatted List of changes.
- UnregisterAssemblies(string[])
When implemented by a class, unregisters assemblies from the project.
- UnregisterAssembly(string)
When implemented by a class, unregisters assembly from the project.
- UnregisterCode(string)
When implemented by a class, removes types declared in given source file from being accessible for code analysis.
- UnregisterCodeFiles(string[])
When implemented by a class, removes types declared in given source files from being accessible for code analysisn.
Events
- CustomFormattingOptions
Occurs when text document is being formatted to provide custom formatting options.