Class ReclaimerStrategyFactory
Factory for creating objects of BuildSystem.Reclaimer.Strategy
Inheritance
Namespace: BuildSystem.Factories
Assembly: BuildSystem.Factories.dll
Syntax
public static class ReclaimerStrategyFactory : Object
Methods
Clear()
Clean all registered units in factory
Declaration
public static void Clear()
CreateObject(IReclaimerStrategyProps, ILogger?, string)
Create instance of object IReclaimerStrategy when properties already exists
Declaration
public static IReclaimerStrategy CreateObject(IReclaimerStrategyProps propObject, ILogger? logger, string tempDir)
Parameters
Type | Name | Description |
---|---|---|
IReclaimerStrategyProps | propObject | Properties for creating object |
ILogger | logger | Logging object |
string | tempDir | Path to folder where temporary folders can be created |
Returns
Type | Description |
---|---|
IReclaimerStrategy |
CreateObject(string, JsonNode?, string, ILogger?, string, IReclaimerStrategyProps?)
Create instance of object IReclaimerStrategyProps when json object doesn't contain ident of creating class
Declaration
public static IReclaimerStrategy CreateObject(string className, JsonNode? jsonInfo, string relativeDir, ILogger? logger, string tempDir, IReclaimerStrategyProps? defaultProps = null)
Parameters
Type | Name | Description |
---|---|---|
string | className | Name of class of creating object |
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 |
IReclaimerStrategyProps | defaultProps | Default properties for creating object |
Returns
Type | Description |
---|---|
IReclaimerStrategy |
CreateProps(string, JsonNode?, string, IReclaimerStrategyProps?)
Create instance of object IReclaimerStrategyProps when json object doesn't contain ident of creating class
Declaration
public static IReclaimerStrategyProps CreateProps(string className, JsonNode? jsonInfo, string relativeDir, IReclaimerStrategyProps? defaultProps = null)
Parameters
Type | Name | Description |
---|---|---|
string | className | Name of class of creating object |
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonObject with properties |
string | relativeDir | A directory which should be added to properties containing relative paths |
IReclaimerStrategyProps | defaultProps | Default properties for creating object |
Returns
Type | Description |
---|---|
IReclaimerStrategyProps |
CreateProps(JsonNode?, string, IReclaimerStrategyProps?)
Create instance of object IReclaimerStrategyProps when ident of creating class is stored in json
Declaration
public static IReclaimerStrategyProps? CreateProps(JsonNode? jsonInfo, string relativeDir, IReclaimerStrategyProps? defaultProps = null)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonInfo | JsonObject with only one key - ident of class |
string | relativeDir | Directory which should be added to properties containing relative paths |
IReclaimerStrategyProps | defaultProps | Default properties for creating object |
Returns
Type | Description |
---|---|
IReclaimerStrategyProps | New instance of object |
RegisterAssembly<T1, T2>(string)
Add accordance of classname and int location (assembly) so instance of class can be created later
Declaration
public static void RegisterAssembly<T1, T2>(string classIdent) where T1 : IReclaimerStrategy where T2 : IReclaimerStrategyProps
Parameters
Type | Name | Description |
---|---|---|
string | classIdent |
Type Parameters
Name | Description |
---|---|
T1 | Registering class of manager object |
T2 | Registering class of properties of manager object |