Class ProjectCpp
Common project on C++
Inheritance
Implements
Namespace: BuildSystem.Project.Cpp
Assembly: BuildSystem.ProjectList.dll
Syntax
public class ProjectCpp : Object, IProject
Constructors
ProjectCpp(ILogger?, IProjectPropReader, VariantList, string, GetProjectInfoDelegate)
Project where source - .vcxproj file
Declaration
public ProjectCpp(ILogger? logger, IProjectPropReader propReader, VariantList variantList, string tempDir, GetProjectInfoDelegate getProjectInfo)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | _logger |
IProjectPropReader | propReader | Properties of creating project |
VariantList | variantList | List of variant from build space |
string | tempDir | The directory for temporary files of build system tools |
GetProjectInfoDelegate | getProjectInfo | Get information about another project in build space |
Properties
AppType
Native project type
Declaration
public string AppType { get; }
Property Value
Type | Description |
---|---|
string |
BuildPlatforms
List of platforms supported by project - it can only be build in one of them
Declaration
public HashSet<string> BuildPlatforms { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.HashSet<><string> |
CacheInfo
Information about cache
Declaration
public CacheProjectInfo? CacheInfo { get; set; }
Property Value
Type | Description |
---|---|
CacheProjectInfo |
CanCalcNativeDependency
Flag - include project in calculating native dependency
Declaration
public bool CanCalcNativeDependency { get; }
Property Value
Type | Description |
---|---|
bool |
CanRestorePackageDeps
Flag - restore package dependencies through build space mechanism
Declaration
public bool CanRestorePackageDeps { get; }
Property Value
Type | Description |
---|---|
bool |
CompiledVariants
List of variant names - each variant was compiled in this session. ALso stores folder - where was compiled
Declaration
public List<KeyValuePair<string, string?>> CompiledVariants { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><KeyValuePair<string, string>> |
Dependencies
List of projects, which are directive dependencies of current project
Declaration
public List<ProjectDependency> Dependencies { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><ProjectDependency> |
JsonPath
Path to .json with properties of project
Declaration
public string JsonPath { get; }
Property Value
Type | Description |
---|---|
string |
JsonProjectDependencies
Properties how to read project dependencies from the local project file
Declaration
public JsonProjectDependencies? JsonProjectDependencies { get; set; }
Property Value
Type | Description |
---|---|
JsonProjectDependencies |
MainFilePath
Path to main project file (dproj, csproj, etc)
Declaration
public string MainFilePath { get; }
Property Value
Type | Description |
---|---|
string |
ManagersFactory
Objects which contain properties of manager objects
Declaration
public IManagersFactory ManagersFactory { get; }
Property Value
Type | Description |
---|---|
IManagersFactory |
Name
Unique name of project
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
NativeDependencies
Properties how to read dependencies from main project file
Declaration
public NativeDependencies? NativeDependencies { get; set; }
Property Value
Type | Description |
---|---|
NativeDependencies |
Packages
List of packages, which contain build results of current project
Declaration
public List<IPackage> Packages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><IPackage> |
PropsGenDoc
Properties - how to generate documentation
Declaration
public ProjectGenDocProps? PropsGenDoc { get; set; }
Property Value
Type | Description |
---|---|
ProjectGenDocProps |
Recompiled
Flag - project was really compiled
Declaration
public bool Recompiled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Scope
Scope of the project to give the opportunity to filter / group projects
Declaration
public string Scope { get; }
Property Value
Type | Description |
---|---|
string |
Sources
Masks to source files of project
Declaration
public List<string> Sources { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
Tests
List of test cases
Declaration
public List<string> Tests { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
Type
Type of project. This affects on creating instance - this type should be registered in projects factory
Declaration
public string Type { get; }
Property Value
Type | Description |
---|---|
string |
Methods
AddPackageConstants(string, IPackage)
Add replace rules to read package properties
Declaration
public void AddPackageConstants(string variantName, IPackage package)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
IPackage | package | Modifying package |
Build(string, Dictionary<string, string>)
Builds every project. Success flag can be read from Recompiled
Declaration
public Dictionary<string, string?> Build(string variantName, Dictionary<string, string> buildParams)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
System.Collections.Generic.Dictionary<,><string, string> | buildParams | Params for building |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, string> | Params of building, which will be written in output json file, describing build process |
Clean(string)
Delete each file of build results
Declaration
public void Clean(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
CreateLng(string)
Do nothing
Declaration
public GenLangResult? CreateLng(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName |
Returns
Type | Description |
---|---|
GenLangResult |
GenDoc(string)
Generate HTML-documentation for project
Declaration
public void GenDoc(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
GetBuildResultDefaultPath(string)
Path to folder (!), where build results are stored
Declaration
public string? GetBuildResultDefaultPath(string variant)
Parameters
Type | Name | Description |
---|---|---|
string | variant | Variant of restoring |
Returns
Type | Description |
---|---|
string |
GetBuildResultDocumentationPath(string)
Path to file, provided for generating documentation
Declaration
public string? GetBuildResultDocumentationPath(string variant)
Parameters
Type | Name | Description |
---|---|---|
string | variant | Variant of generating documentation |
Returns
Type | Description |
---|---|
string |
GetBuildResultPath(string, string)
Path to file as build result
Declaration
public string? GetBuildResultPath(string variantName, string buildResultType)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
string | buildResultType | Type of result file |
Returns
Type | Description |
---|---|
string |
GetBuildResultPaths(string)
Paths to build results
Declaration
public Dictionary<string, string> GetBuildResultPaths(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, string> |
GetConstants(Variant)
Get dictionary of values and their replaces in strings
Declaration
public Dictionary<string, string> GetConstants(Variant variant)
Parameters
Type | Name | Description |
---|---|---|
Variant | variant |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, string> |
GetContent(string)
Paths to folders and files, which included in content of project. Content of project:
- Wll be copied as build results into folders of parent projects
Declaration
public List<string> GetContent(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
GetNeedBuild(string)
Some special project check to define if build is need
Declaration
public string GetNeedBuild(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
Returns
Type | Description |
---|---|
string |
GetTestReportPath(string)
Path to folder with results of tests
Declaration
public string? GetTestReportPath(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName |
Returns
Type | Description |
---|---|
string |
ProcessRestoredBuildResult(string, string)
Do nothing
Declaration
public void ProcessRestoredBuildResult(string variantName, string buildResultPath)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | |
string | buildResultPath |
Reclaim(string)
Reclaims old versions from storage for each package
Declaration
public void Reclaim(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
RunTests(string)
Run unit-test for project if test properties are set
Declaration
public bool RunTests(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |
Returns
Type | Description |
---|---|
bool |
SetNativeProps(IDSProject?)
Sets properties, which have been read from native project file (dproj/csproj/etc)
Declaration
public void SetNativeProps(IDSProject? nativeInfo)
Parameters
Type | Name | Description |
---|---|---|
IDSProject | nativeInfo | Properties of native project |
Sign(string)
Sign binary results of building project
Declaration
public void Sign(string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | variantName | Environment params |