Class PackageFactory
Factory for creating objects of BuildSystem.Package
Inheritance
Namespace: BuildSystem.Package.Factory
Assembly: BuildSystem.Package.Factory.dll
Syntax
public static class PackageFactory : Object
Fields
NodeClass
Node in JsonObject with class type of package
Declaration
public const string NodeClass = "class"
Field Value
Type | Description |
---|---|
string |
NodePackages
Node in JsonObject with array of packages
Declaration
public const string NodePackages = "packages"
Field Value
Type | Description |
---|---|
string |
Methods
CreateListObjects(JsonNode?, string, ILogger?, string, IPackageProps?)
Create list of objects which contains properties for package
Declaration
public static List<IPackage> CreateListObjects(JsonNode? jsonInfo, string relativeDir, ILogger? logger, string tempDir, IPackageProps? defaultProps)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonArray with properties |
string | relativeDir | A directory which should be added to properties containing relative paths |
ILogger | logger | Logging object |
string | tempDir | Path to folder where temporary folders can be created |
IPackageProps | defaultProps | Default properties of creating package |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><IPackage> |
CreateListObjects(JsonObject?, string, ILogger?, string)
Create list of objects which contains properties for package
Declaration
public static List<IPackage> CreateListObjects(JsonObject? jsonInfo, string relativeDir, ILogger? logger, string tempDir)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonObject | jsonInfo | JsonObject with mandatory NodePackages. Also contains default values for creating packages |
string | relativeDir | A directory which should be added to properties containing relative paths |
ILogger | logger | Logging object |
string | tempDir | Path to folder where temporary folders can be created |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><IPackage> |
CreateListProps(ILogger?, JsonNode?, string, string, IPackageProps?)
Create list of objects which contains properties for package
Declaration
public static List<IPackageProps> CreateListProps(ILogger? logger, JsonNode? jsonInfo, string relativeDir, string tempDir, IPackageProps? defaultProps)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logging object |
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonArray with properties |
string | relativeDir | A directory which should be added to properties containing relative paths |
string | tempDir | Path to folder where temporary folders can be created |
IPackageProps | defaultProps | Default properties of creating package |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><IPackageProps> |
CreateObject(IPackageProps?, ILogger?, string)
Create instance of object - package
Declaration
public static IPackage? CreateObject(IPackageProps? props, ILogger? logger, string tempDir)
Parameters
Type | Name | Description |
---|---|---|
IPackageProps | props | Properties of creating object |
ILogger | logger | Logging object |
string | tempDir | Path to folder where temporary folders can be created |
Returns
Type | Description |
---|---|
IPackage | New instance of object |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Unknown type of props |
CreateObject(JsonNode?, string, ILogger?, string, IPackageProps?)
Create instance of object - package
Declaration
public static IPackage? CreateObject(JsonNode? jsonInfo, string relativeDir, ILogger? logger, string tempDir, IPackageProps? defaultProps)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonObject with properties |
string | relativeDir | A directory which should be added to properties containing relative paths |
ILogger | logger | Logging object |
string | tempDir | Path to folder where temporary folders can be created |
IPackageProps | defaultProps | Default properties of creating package |
Returns
Type | Description |
---|---|
IPackage | New instance of object |
CreateProps(ILogger?, JsonNode?, string, string, IPackageProps?)
Create object which contains properties for package
Declaration
public static IPackageProps? CreateProps(ILogger? logger, JsonNode? jsonInfo, string relativeDir, string tempDir, IPackageProps? defaultProps)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logging object |
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonObject with properties |
string | relativeDir | A directory which should be added to properties containing relative paths |
string | tempDir | Path to folder where temporary folders can be created |
IPackageProps | defaultProps | Default properties of creating package |
Returns
Type | Description |
---|---|
IPackageProps |