Class Variant
Group of settings applied to current instance of build space
Inheritance
Namespace: BuildSystem.Variants
Assembly: BuildSystem.ManagerObject.Interfaces.dll
Syntax
public class Variant : Object
Constructors
Variant()
Group of settings applied to current instance of build space
Declaration
public Variant()
Variant(Variant)
Group of settings applied to current instance of build space initialized from another Variant object
Declaration
public Variant(Variant source)
Parameters
| Type | Name | Description |
|---|---|---|
| Variant | source | Object to copy list from it |
Variant(JsonNode)
Group of settings applied to current instance of build space initialized from another Variant object
Declaration
public Variant(JsonNode jsonObject)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.Json.Nodes.JsonNode | jsonObject | JsonObject with properties |
Fields
NameSpace
Keyword as name space for params
Declaration
public const string NameSpace = "variant"
Field Value
| Type | Description |
|---|---|
| string |
NodeConfig
Value for key in json - node for configuration of setting
Declaration
public const string NodeConfig = "configuration"
Field Value
| Type | Description |
|---|---|
| string |
NodeName
Value for key in json - node for name of setting
Declaration
public const string NodeName = "name"
Field Value
| Type | Description |
|---|---|
| string |
NodePlatform
Value for key in json - node for target of setting
Declaration
public const string NodePlatform = "platform"
Field Value
| Type | Description |
|---|---|
| string |
Properties
Configurations
List of configurations when calling build of project. Key is combination of NodeConfig plus "_" plus project type
Declaration
public Dictionary<string, string> Configurations { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<,><string, string> |
Name
Name which should be unique in VariantList
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Platforms
List of platforms when calling build of project. Key is combination of NodePlatform plus "_" plus project type
Declaration
public Dictionary<string, string> Platforms { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<,><string, string> |
Vars
Self vars added to the object
Declaration
public Dictionary<string, string> Vars { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<,><string, string> |
Methods
Copy(Variant)
Group of settings applied to current instance of build space initialized from another Variant object
Declaration
public void Copy(Variant source)
Parameters
| Type | Name | Description |
|---|---|---|
| Variant | source | Object to copy list from it |
GetConfiguration(string?)
Return value of configuration for specified type of project. Default configuration to search is "configuration". But if Configurations contains key "configuration_" plus project type - it will be used instead of default
Declaration
public string GetConfiguration(string? projectType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectType |
Returns
| Type | Description |
|---|---|
| string |
GetPlatform(string?)
Return value of platform for specified type of project. Default platform to search is "platform". But if Platforms contains key "platform_" plus project type - it will be used instead of default
Declaration
public string GetPlatform(string? projectType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | projectType |
Returns
| Type | Description |
|---|---|
| string |
ReadJson(JsonNode?)
Read JSON and replace some text in it - according to Vars
Declaration
public JsonObject? ReadJson(JsonNode? sourceJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.Json.Nodes.JsonNode | sourceJson |
Returns
| Type | Description |
|---|---|
| System.Text.Json.Nodes.JsonObject |
ToString()
Returns string representation
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |