Class ProjectFactory
Factory for creating objects of Project
Inheritance
Namespace: BuildSystem.Project.Factory
Assembly: BuildSystem.Factories.dll
Syntax
public static class ProjectFactory : Object
Methods
Clear()
Clean all registered units in factory
Declaration
public static void Clear()
CreateObject(string, ILogger?, IProjectPropReader, VariantList, string, GetProjectInfoDelegate?)
Create instance of object IProject when json object doesn't contain ident of creating class
Declaration
public static IProject CreateObject(string classIdent, ILogger? logger, IProjectPropReader propReader, VariantList variantList, string tempDir, GetProjectInfoDelegate? getProjectInfoDelegate = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | classIdent | Unique name of class in BuildSystem.Project.Factory.ProjectFactory.Units (was registered earlier) |
| ILogger | logger | Logging object |
| IProjectPropReader | propReader | Properties of creating project |
| VariantList | variantList | List of variant from build space |
| string | tempDir | The directory for temporary files of build system tools |
| GetProjectInfoDelegate | getProjectInfoDelegate | Delegate to get project info, when you know path its .json |
Returns
| Type | Description |
|---|---|
| IProject |
CreateObject<T>(ILogger?, IProjectPropReader, VariantList, string, GetProjectInfoDelegate?)
Create instance of object IProject when json object doesn't contain ident of creating class
Declaration
public static T CreateObject<T>(ILogger? logger, IProjectPropReader propReader, VariantList variantList, string tempDir, GetProjectInfoDelegate? getProjectInfoDelegate = null) where T : IProject
Parameters
| Type | Name | Description |
|---|---|---|
| ILogger | logger | Logging object |
| IProjectPropReader | propReader | Properties of creating project |
| VariantList | variantList | List of variant from build space |
| string | tempDir | The directory for temporary files of build system tools |
| GetProjectInfoDelegate | getProjectInfoDelegate | Delegate to get project info, when you know path its .json |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T | Registered class of project |
GetSuffixes()
Get list of suffixes for registered assemblies
Declaration
public static HashSet<string> GetSuffixes()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.HashSet<><string> |
RegisterAssembly<T>()
Add accordance of classname and int location (assembly) so instance of class can be created later
Declaration
public static void RegisterAssembly<T>() where T : IProject
Type Parameters
| Name | Description |
|---|---|
| T | Registering class of project |