Class VsProjectExtensions
Extensions methods class that supports the model VsProject.
Inherited Members
Namespace: CodeFactory.WinVs.Models.ProjectSystem
Assembly: CodeFactory.WinVs.dll
Syntax
public static class VsProjectExtensions
Methods
FindCSharpSourceByClassNameAsync(VsProject, string, bool)
Locates a target VsCSharpSource model in a project by the name of the class itself.
Declaration
public static Task<VsCSharpSource> FindCSharpSourceByClassNameAsync(this VsProject source, string className, bool searchAllFolders = true)
Parameters
Type | Name | Description |
---|---|---|
VsProject | source | The project to search in. |
string | className | The name of the class that is managed in the source code file. |
bool | searchAllFolders | optional flag that determines if all folders under the project should be searched. |
Returns
Type | Description |
---|---|
Task<VsCSharpSource> | The source code model the target class was found in. |
FindCSharpSourceByFileNameAsync(VsProject, string, bool)
Locates a target VsCSharpSource model by the filename of the source code file.
Declaration
public static Task<VsCSharpSource> FindCSharpSourceByFileNameAsync(this VsProject source, string fileName, bool searchAllFolders = true)
Parameters
Type | Name | Description |
---|---|---|
VsProject | source | The project to search the model for. |
string | fileName | The name of the source code file. |
bool | searchAllFolders | optional flag that determines if all folders under the project should be searched. |
Returns
Type | Description |
---|---|
Task<VsCSharpSource> | The source code model for the target code file found. |
FindCSharpSourceByInterfaceNameAsync(VsProject, string, bool)
Locates a target VsCSharpSource model in a project by the name of the interface itself.
Declaration
public static Task<VsCSharpSource> FindCSharpSourceByInterfaceNameAsync(this VsProject source, string name, bool searchAllFolders = true)
Parameters
Type | Name | Description |
---|---|---|
VsProject | source | The project to search. |
string | name | The name of the interface that is managed in the source control file. |
bool | searchAllFolders | optional flag that determines if all folders under the project should be searched. |
Returns
Type | Description |
---|---|
Task<VsCSharpSource> | The source code model the target interface was found in. |
FindSourceAsync(VsProject, CsClass, bool)
Finds the source code for a target class in a project. This will be based on the source document the class was built from.
Declaration
public static Task<VsCSharpSource> FindSourceAsync(this VsProject source, CsClass sourceClass, bool searchAllFolders = true)
Parameters
Type | Name | Description |
---|---|---|
VsProject | source | The project to search. |
CsClass | sourceClass | The class model to find the source file for. |
bool | searchAllFolders | optional flag that determines if all folders under the project should be searched. |
Returns
Type | Description |
---|---|
Task<VsCSharpSource> | The source code file the target model was found in. |