Class VsSolution
Data model that represents the loaded solution in visual studio.
Inherited Members
Namespace: CodeFactory.VisualStudio
Assembly: CodeFactory.VisualStudio.dll
Syntax
public abstract class VsSolution : VsModel, IVsSolution, IVsModel, IModel<VisualStudioModelType>, IChildren
Constructors
| Improve this Doc View SourceVsSolution(bool, bool, IReadOnlyList<ModelException<VisualStudioModelType>>, string, bool, string)
Constructor for the base class VsSolution
Declaration
protected VsSolution(bool isLoaded, bool hasErrors, IReadOnlyList<ModelException<VisualStudioModelType>> modelErrors, string name, bool hasChildren, string path)
Parameters
Type | Name | Description |
---|---|---|
bool | isLoaded | Flag that determines if the model is loaded. |
bool | hasErrors | Flag that determines if errors occurred while loading the model. |
IReadOnlyList<ModelException<VisualStudioModelType>> | modelErrors | The list of errors that occurred if any. |
string | name | The name of the model. |
bool | hasChildren | Flag that determines if the solution has any children. |
string | path | The fully qualified path of the solution. |
Properties
| Improve this Doc View SourceHasChildren
Flag that determines if this visual studio object has child objects.
Declaration
public bool HasChildren { get; }
Property Value
Type | Description |
---|---|
bool |
Path
The fully qualified path to the solution file name.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Improve this Doc View SourceCreateSolutionFolderAsync(string)
Creates a new solution folder for the target solution.
Declaration
public abstract Task<VsSolutionFolder> CreateSolutionFolderAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the solution folder to be added. |
Returns
Type | Description |
---|---|
Task<VsSolutionFolder> | Returns the solution folder. |
GetChildrenAsync(bool)
Gets the solution folders and projects that belong to the solution.
Declaration
public abstract Task<IReadOnlyList<VsModel>> GetChildrenAsync(bool allChildren)
Parameters
Type | Name | Description |
---|---|---|
bool | allChildren | Get all children not just the first children of the solution. |
Returns
Type | Description |
---|---|
Task<IReadOnlyList<VsModel>> | Returns a readonly list of the children to the solution. If there are no children an empty list will be returned. |
GetProjectsAsync(bool)
Gets the projects for the solution.
Declaration
public abstract Task<IReadOnlyList<VsProject>> GetProjectsAsync(bool allChildren)
Parameters
Type | Name | Description |
---|---|---|
bool | allChildren | Get all children not just the first children of the solution. |
Returns
Type | Description |
---|---|
Task<IReadOnlyList<VsProject>> | Returns all the projects that are part of the solution. Will return an empty list if no projects are found. |
GetSolutionFoldersAsync(bool)
Gets the solution folders for the solution.
Declaration
public abstract Task<IReadOnlyList<VsSolutionFolder>> GetSolutionFoldersAsync(bool allChildren)
Parameters
Type | Name | Description |
---|---|---|
bool | allChildren | Get all children not just the first children of the solution. |
Returns
Type | Description |
---|---|
Task<IReadOnlyList<VsSolutionFolder>> | Returns a readonly of the solutions folders that are part of the solution. If there are no solution folders an empty list will be returned. |