Class VsModelExtensions
Extensions method class to support VsModel
Inherited Members
Namespace: CodeFactory.WinVs.Models.ProjectSystem
Assembly: CodeFactory.WinVs.dll
Syntax
public static class VsModelExtensions
Methods
GetHostingProjectAsync(VsModel)
Gets the hosting project from the provided VsModel
Declaration
public static Task<VsProject> GetHostingProjectAsync(this VsModel source)
Parameters
Type | Name | Description |
---|---|---|
VsModel | source | The visual studio model to search the project. |
Returns
Type | Description |
---|---|
Task<VsProject> | The VsProject model that hosts the current model or null if the project is not found. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Raised when the model is null. |
CodeFactoryException | Raised if the source code functionality cannot load the project file. |
GetParentProjectFolderAsync(VsModel)
Gets the hosting project folder.
Declaration
public static Task<VsProjectFolder> GetParentProjectFolderAsync(this VsModel source)
Parameters
Type | Name | Description |
---|---|---|
VsModel | source | Model to get the parent project folder. |
Returns
Type | Description |
---|---|
Task<VsProjectFolder> | Returns the parent project folder or null if their is no parent project folder. |