Class PackageProps
Properties of package
Namespace: BuildSystem.Package
Assembly: BuildSystem.ManagerObject.Interfaces.dll
Syntax
public class PackageProps : Object, IPackageProps, ICloneable
Constructors
PackageProps(ILogger?, string)
Properties of package
Declaration
public PackageProps(ILogger? logger, string parentTempDir)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logging object |
string | parentTempDir | Parent folder for all temporary folders of this object |
Fields
_variantFiles
Variant of build system and files, which should be copied in package when running this variant
Declaration
protected Dictionary<string, List<PackageFiles>> _variantFiles
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, System.Collections.Generic.List<><PackageFiles>> |
NodeAuthors
Name of node for package authors in JsonObject with properties
Declaration
public const string NodeAuthors = "authors"
Field Value
Type | Description |
---|---|
string |
NodeCondition
Name of node in JsonObject with properties describing _variantFiles. ExpressionCondition text, provided into targets file. This text is for MSBuild, which will process this targets file
Declaration
public const string NodeCondition = "condition"
Field Value
Type | Description |
---|---|
string |
NodeCopyright
Name of node for package description in JsonObject with properties
Declaration
public const string NodeCopyright = "copyright"
Field Value
Type | Description |
---|---|
string |
NodeDependencies
Name of node for list of package dependencies in JsonObject with properties
Declaration
public const string NodeDependencies = "dependencies"
Field Value
Type | Description |
---|---|
string |
NodeDescription
Name of node for package description in JsonObject with properties
Declaration
public const string NodeDescription = "description"
Field Value
Type | Description |
---|---|
string |
NodeFiles
Name of node in JsonObject with properties describing _variantFiles. List of rules, describing file / folder and its target copy path
Declaration
public const string NodeFiles = "files"
Field Value
Type | Description |
---|---|
string |
NodeGroup
Name of node for package group in JsonObject with properties
Declaration
public const string NodeGroup = "group"
Field Value
Type | Description |
---|---|
string |
NodeId
Name of node for unique id in JsonObject with properties
Declaration
public const string NodeId = "id"
Field Value
Type | Description |
---|---|
string |
NodeLanguage
Name of node for package language in JsonObject with properties
Declaration
public const string NodeLanguage = "language"
Field Value
Type | Description |
---|---|
string |
NodeLicense
Name of node in nuspec JsonObject
Declaration
public const string NodeLicense = "license"
Field Value
Type | Description |
---|---|
string |
NodeOwners
Name of node for package owners in JsonObject with properties
Declaration
public const string NodeOwners = "owners"
Field Value
Type | Description |
---|---|
string |
NodeProjectUrl
Name of node in nuspec JsonObject
Declaration
public const string NodeProjectUrl = "project_url"
Field Value
Type | Description |
---|---|
string |
NodeRepositoryType
Name of node in JsonObject with properties describing RepoInfo
Declaration
public const string NodeRepositoryType = "repository_type"
Field Value
Type | Description |
---|---|
string |
NodeRepositoryUrl
Name of node in JsonObject with properties describing RepoInfo
Declaration
public const string NodeRepositoryUrl = "repository_url"
Field Value
Type | Description |
---|---|
string |
NodeTags
Name of node for tags in JsonObject with properties
Declaration
public const string NodeTags = "tags"
Field Value
Type | Description |
---|---|
string |
NodeTitle
Name of node for package title in JsonObject with properties
Declaration
public const string NodeTitle = "title"
Field Value
Type | Description |
---|---|
string |
NodeVariantFiles
Name of node in JsonObject with properties describing _variantFiles
Declaration
public const string NodeVariantFiles = "variant_files"
Field Value
Type | Description |
---|---|
string |
NodeVersion
Name of node for version in JsonObject with properties
Declaration
public const string NodeVersion = "version"
Field Value
Type | Description |
---|---|
string |
RelativeBuildPath
Path, which should be added to relative SourceFiles paths
Declaration
protected string RelativeBuildPath
Field Value
Type | Description |
---|---|
string |
VariantConstants
List of rules to replace strings in paths VariantFiles
Declaration
public Dictionary<string, Dictionary<string, string>> VariantConstants
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, System.Collections.Generic.Dictionary<,><string, string>> |
Properties
Authors
List of authors of package
Declaration
public List<string> Authors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
CacheInfo
Some information stored in cache
Declaration
public CachePackageInfo CacheInfo { get; set; }
Property Value
Type | Description |
---|---|
CachePackageInfo |
Constants
String constants to replace when reading values of properties. For a example $project:title$ = "test.project"
Declaration
public Dictionary<string, string> Constants { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, string> |
Copyright
Value of copyright
Declaration
public string Copyright { get; }
Property Value
Type | Description |
---|---|
string |
Description
Description of package
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
string |
ExpressionAuthors
List of authors of package
Declaration
public List<string> ExpressionAuthors { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
ExpressionCopyright
Value of copyright
Declaration
public string ExpressionCopyright { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionDescription
Description of package
Declaration
public string ExpressionDescription { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionGroup
Group of package
Declaration
public string ExpressionGroup { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionId
Expression that contains id of package - unique name
Declaration
public string ExpressionId { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionLanguage
Language of package
Declaration
public string ExpressionLanguage { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionOwners
List of owners of package
Declaration
public List<string> ExpressionOwners { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
ExpressionProjectURL
Value of projectURL
Declaration
public string ExpressionProjectURL { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpressionTitle
Title of package
Declaration
public string ExpressionTitle { get; set; }
Property Value
Type | Description |
---|---|
string |
Group
Group of package
Declaration
public string Group { get; }
Property Value
Type | Description |
---|---|
string |
Hash
Hash value of sources for binaries in package
Declaration
public string Hash { get; set; }
Property Value
Type | Description |
---|---|
string |
Id
ExpressionId of package - unique name
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string | Value of ExpressionId after replacing with Constants |
Language
Language of package
Declaration
public string Language { get; }
Property Value
Type | Description |
---|---|
string |
LicenseInfo
Some information about package license
Declaration
public LicensePackageInfo LicenseInfo { get; set; }
Property Value
Type | Description |
---|---|
LicensePackageInfo |
Logger
Logging object
Declaration
public ILogger? Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Owners
List of owners of package
Declaration
public List<string> Owners { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
PackageDependencies
List of package dependencies
Declaration
public List<PackageDependency> PackageDependencies { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><PackageDependency> |
PackageDependenciesByConstants
List of package dependencies after replacing by constants. This is a clone of PackageDependencies
Declaration
public List<PackageDependency> PackageDependenciesByConstants { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><PackageDependency> |
PackagePath
Path to archive, which can be pushed to the repository
Declaration
public string? PackagePath { get; set; }
Property Value
Type | Description |
---|---|
string |
PackageTempDir
Temporary directory for package
Declaration
public string PackageTempDir { get; set; }
Property Value
Type | Description |
---|---|
string |
ParentTempDir
Parent folder for all temporary folders of this object
Declaration
protected string ParentTempDir { get; set; }
Property Value
Type | Description |
---|---|
string |
ProjectURL
Value of projectURL
Declaration
public string ProjectURL { get; }
Property Value
Type | Description |
---|---|
string |
ReleaseNotes
Value of releaseNotes
Declaration
public string ReleaseNotes { get; set; }
Property Value
Type | Description |
---|---|
string |
RepoInfo
Some information about package repository
Declaration
public RepoPackageInfo RepoInfo { get; set; }
Property Value
Type | Description |
---|---|
RepoPackageInfo |
SourceFiles
Files, which should be copied into package
Declaration
public List<string> SourceFiles { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
Tags
List of tags provided to package
Declaration
public List<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
Title
Title of package
Declaration
public string Title { get; }
Property Value
Type | Description |
---|---|
string |
VariantFiles
Variant of build system and files, which should be copied in package when running this variant
Declaration
public Dictionary<string, List<PackageFiles>> VariantFiles { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, System.Collections.Generic.List<><PackageFiles>> |
VariantNames
List of possible values in _variantFiles
Declaration
public List<string> VariantNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<><string> |
VariantValues
List of possible values in _variantFiles
Declaration
public Dictionary<string, List<PackageFiles>>.ValueCollection VariantValues { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<BuildSystem.Package.PackageFiles>>.ValueCollection |
Version
Version of package
Declaration
public VersionProp Version { get; set; }
Property Value
Type | Description |
---|---|
VersionProp |
Methods
Clone()
Creates a new instance - copy of current object
Declaration
public virtual object Clone()
Returns
Type | Description |
---|---|
object |
Copy(IPackageProps)
Copy properties from another object. New properties will override even if new value is null
Declaration
public virtual void Copy(IPackageProps source)
Parameters
Type | Name | Description |
---|---|---|
IPackageProps | source |
EmptyValues()
Copy properties from another object. New properties will override even if new value is null
Declaration
public virtual void EmptyValues()
GetResultVariantFiles(string?)
Read _variantFiles with using RelativeBuildPath and Constants
Declaration
public virtual Dictionary<string, List<PackageFiles>> GetResultVariantFiles(string? variantFilter = null)
Parameters
Type | Name | Description |
---|---|---|
string | variantFilter | Name of variant for filtering results. If null - this filter disabled |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, System.Collections.Generic.List<><PackageFiles>> |
GetValue(string)
Read expression and replace according to Constants
Declaration
public string GetValue(string expression)
Parameters
Type | Name | Description |
---|---|---|
string | expression | Original line |
Returns
Type | Description |
---|---|
string | Line after replacing expressions |
GetValueDictionary(Dictionary<string, string>)
Read expression and replace according to Constants
Declaration
public Dictionary<string, string> GetValueDictionary(Dictionary<string, string> expressions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<,><string, string> | expressions | Original line |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<,><string, string> | Line after replacing expressions |
GetValueList(List<string>)
Read expression and replace according to Constants
Declaration
public List<string> GetValueList(List<string> expressions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<><string> | expressions | Original line |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><string> | Line after replacing expressions |
ToString()
String representation of package - id plus version
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Update(JsonNode?, string)
Update internal properties - read them from JsonObject
Declaration
public virtual void Update(JsonNode? jsonNode, string relativePath)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonNode | JsonObject with parameters for package |
string | relativePath | Adding path if the path in value is relative |