Class RoslynSolution
- Namespace
- Alternet.Syntax.Parsers.Roslyn.CodeCompletion
- Assembly
- Alternet.Syntax.Parsers.Roslyn.v9.dll
Represents properties and methods to service source code documents intended to use for Roslyn supported languages.
public class RoslynSolution : IRoslynSolution, INotify, IUpdate, IDisposable
- Inheritance
-
RoslynSolution
- Implements
- Derived
Constructors
- RoslynSolution(SourceCodeKind, Type)
Initializes a new instance of the
RoslynSolution
class with default settings.
Properties
- AssemblySearchPaths
Gets or sets a collection of assembly search paths.
- BaseDirectory
Gets or sets solution base directory.
- Conditionals
When implemented by a class, gets or sets a collection of conditional symbols
- CustomXMLDocPath
Gets a custom xml documentation path.
- FrameworkPath
Gets or sets path to the .NET Framework assemblies
- ProjectId
Gets a current
Microsoft.CodeAnalysis.ProjectId
.
- ScriptSearchPaths
Gets or sets a collection of script source search paths.
- Solution
Gets a current
Microsoft.CodeAnalysis.Project
.
- SourceKind
Gets kind (regular or script) of the source code.
- TargetFrameworkVersion
Gets or sets version of the .NET Framework to use with the methods in Framework Location Helper.
- UpdateCount
Keeps track of calls to
BeginUpdate
andEndUpdate
so that they can be nested.
- Workspace
Gets a current project
Microsoft.CodeAnalysis.Workspace
.
Methods
- AddDocument(string, SourceText, ProjectId, bool)
Adds a new document to the project.
- AddDocument(string, string, ProjectId, bool)
Adds a new document to the project.
- AddNotifier(INotifier)
Adds new handler to respond a notification.
- AddProject(ProjectInfo)
Adds a new project to this solution
- AddProject(string, string)
When implemented by a class, adds project to the solution
- AddReference(MetadataReference, ProjectId)
Adds metadata reference to the project
- BeginUpdate()
Prevents object state updating until calling
EndUpdate
method.
- CloseDocument(DocumentId)
When implemented by a class, closes specified document.
- CreateDefaultProject()
Creates and adds default project to this solution.
- CreateProjectInfo(string, string)
Creates a new project without adding it to the solution.
- DisableUpdate()
Prevents object state updating until calling
EnableUpdate
method.
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- DocumentBelongsToDefaultProject(DocumentId)
Indicates if document belongs to the default project.
- 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.
- FindDocument(Solution, ProjectId, string)
Gets
Microsoft.CodeAnalysis.Document
matches the given parameters.
- FindDocument(string, ProjectId)
Gets
Microsoft.CodeAnalysis.Document
matches the given file path.
- GetProject(ProjectId)
Gets or creates Project in the solution.
- GetProject(string)
Gets or creates Project in the solution.
- IsDocumentOpen(DocumentId)
Determines if document is already open in the workspace.
- Notify(EventArgs)
Notifies all notifiers about updating object state.
- OpenDocument(DocumentId)
Opens specified document if needed.
- RegisterAssemblies(string[], ProjectId, TargetFramework)
Replaces assemblies in the project with new ones.
- RegisterAssembly(string, ProjectId)
Registers assembly in the project.
- RegisterCode(string, string, ProjectId)
Makes types declared in given source file accessible for code analysis.
- RegisterCodeFiles(string[], ProjectId)
Makes types declared in given source files accessible for code analysis.
- RegisterCodeText(string, string, ProjectId)
Makes types declared in given source file accessible for code analysis.
- RegisterNamespaces(string[], ProjectId, string)
Registers global namespaces.
- RegisterProjectReferences(ProjectId[], ProjectId)
Adds project references to the project.
- RegisterProjectReferences(string[], ProjectId)
Adds project references to the project.
- RemoveDocument(DocumentId)
Removes specified
Microsoft.CodeAnalysis.Document
from the project.
- RemoveDocument(string, ProjectId)
Removes specified document from the project.
- RemoveNotifier(INotifier)
Exclude specified handler from notification handlers list.
- RemoveProject(ProjectId)
Removes project from the solution
- ReplaceCodeFile(string, string, ProjectId)
Updates code completion with changes in the source file.
- ReplaceDocument(DocumentId, SourceText)
Updates
Microsoft.CodeAnalysis.Document
to have the text specified.
- ReplaceDocument(DocumentId, string)
Updates
Microsoft.CodeAnalysis.Document
to have the text specified.
- ResolveAssemblyName(string, IDefaultAssembliesProvider)
Try to find real assembly name matches the given name.
- SetProjectConditionals(string[], ProjectId)
Sets conditional compilation symbols for given project
- UnregisterAssemblies(string[], ProjectId)
Unregisters assemblies from the project.
- UnregisterAssembly(string, ProjectId)
Unregisters assembly from the project.
- UnregisterCode(string, ProjectId)
Removes types declared in given source file from being accessible for code analysis.
- UnregisterCodeFiles(string[], ProjectId)
Removes types declared in given source files from being accessible for code analysis.
- UnregisterProjectReferences(string[], ProjectId)
When implemented by a class, unregisters assemblies from the project.
- Update()
Updates an object state.
- WithDefaultAssemblies(TechnologyEnvironment, bool, ProjectId, TargetFramework, bool)
Registers some most frequently used assemblies.
Specifies technology environment. Specifies whether existing assemblies should be preserved. Specifies project to add reference to. Specifies target framework. In case of .NET Core, adds minimal set of referencesIRoslynSolution instance with default assemblies being registered for code completion