Class ManagersFactoryCommon
Help class to get access to manager objects settings which were created from settings files
Inheritance
Implements
Namespace: BuildSystem.ManagersFactory.Common
Assembly: BuildSystem.Factories.dll
Syntax
public class ManagersFactoryCommon : Object, IManagersFactory
Constructors
ManagersFactoryCommon(ILogger?, string, VariantList)
Help class to get access to manager objects settings which were created from settings files
Declaration
public ManagersFactoryCommon(ILogger? logger, string tempDir, VariantList variants)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | |
string | tempDir | |
VariantList | variants |
ManagersFactoryCommon(IManagersFactory)
Copy of help class to get access to manager objects settings which were created from settings files
Declaration
public ManagersFactoryCommon(IManagersFactory source)
Parameters
Type | Name | Description |
---|---|---|
IManagersFactory | source | Object to copy properties from it |
Properties
Logger
Logging object
Declaration
public ILogger? Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Names
Accordance between specified object type + variant and object name
Declaration
public ListManagerNameForVariant Names { get; set; }
Property Value
Type | Description |
---|---|
ListManagerNameForVariant |
Suffixes
List of possible suffixes when calling creating objects methods. We can search for "cleaner" and then for "cleaner_delphi". It is important that first of all we search with suffixes and only then without them
Declaration
public Queue<string> Suffixes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Queue<><string> |
VariantList
List of possible values for manager objects. Each manager object has its own configuration depending on this variant
Declaration
public VariantList VariantList { get; }
Property Value
Type | Description |
---|---|
VariantList |
Methods
AddTemplate(IManagerProp)
Save object in own dictionary so later it can be used to create IManagerProp or IManager object
Declaration
public void AddTemplate(IManagerProp managerProp)
Parameters
Type | Name | Description |
---|---|---|
IManagerProp | managerProp | Existing instance of properties |
AddTemplate(JsonNode?, string)
Add template by reading it from JsonObject. This method helps in some cases, but should be removed later
Declaration
public void AddTemplate(JsonNode? nodeObject, string relativeDir)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | nodeObject | |
string | relativeDir |
Clone()
Create clone of current object
Declaration
public IManagersFactory Clone()
Returns
Type | Description |
---|---|
IManagersFactory |
CreateManager<T>(string, string)
Create IManager object when you know its unique ident and variant of properties
Declaration
public T? CreateManager<T>(string objectName, string variantName) where T : IManager
Parameters
Type | Name | Description |
---|---|---|
string | objectName | |
string | variantName | Group of settings |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
CreateManagerForType<T>(string, string)
Create IManager object when you have group and variant of object
Declaration
public T? CreateManagerForType<T>(string objectType, string variantName) where T : IManager
Parameters
Type | Name | Description |
---|---|---|
string | objectType | Name of group |
string | variantName | Group of settings |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
CreateProp(ManagerType, string, JsonNode, string, IManagerProp?)
Create instance of IManagerProp for JsonObject with properties
Declaration
public static IManagerProp CreateProp(ManagerType type, string className, JsonNode objectProps, string relativeDir, IManagerProp? parentProps = null)
Parameters
Type | Name | Description |
---|---|---|
ManagerType | type | |
string | className | |
System.Text.Json.Nodes.JsonNode | objectProps | |
string | relativeDir | |
IManagerProp | parentProps |
Returns
Type | Description |
---|---|
IManagerProp |
CreateProp<T>(string, string)
Create IManagerProp object when you know its unique ident and variant of properties
Declaration
public T? CreateProp<T>(string objectName, string variantName) where T : IManagerProp
Parameters
Type | Name | Description |
---|---|---|
string | objectName | |
string | variantName | Group of settings |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
CreatePropForType<T>(string, string)
Create IManagerProp object when you have group and variant of object
Declaration
public T? CreatePropForType<T>(string objectType, string variantName) where T : IManagerProp
Parameters
Type | Name | Description |
---|---|---|
string | objectType | Name of group |
string | variantName | Group of settings |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetPropName(string, string)
Show name of properties group
Declaration
public string? GetPropName(string objectName, string variantName)
Parameters
Type | Name | Description |
---|---|---|
string | objectName | Type of manager object |
string | variantName | Name of variant |
Returns
Type | Description |
---|---|
string |