More work on SzDataHandler
This commit is contained in:
@@ -9,10 +9,11 @@ public class Program
|
||||
{
|
||||
private static readonly DefaultLocalFileManager _fileManager = new();
|
||||
private static readonly Logger _logger = new(_fileManager);
|
||||
private static readonly DefaultDatabaseHandler _dbHandler = new();
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
SZ.Init(_fileManager, _logger);
|
||||
SZ.Init(_fileManager, _logger, _dbHandler);
|
||||
|
||||
bool shouldClose = false;
|
||||
|
||||
|
||||
@@ -175,7 +175,22 @@ public class SzDataHandler
|
||||
|
||||
#region Other
|
||||
|
||||
public Sz
|
||||
public SzTemplateField? CreateTemplateField(string id, SzFieldType fieldType, bool isList = false, string? defaultValue = null, bool isSpecialType = false, string? specialTypeValue = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id)) return null;
|
||||
|
||||
var newField = new SzTemplateField()
|
||||
{
|
||||
Id = id,
|
||||
FieldType = fieldType,
|
||||
IsList = isList,
|
||||
IsSpecialType = isSpecialType,
|
||||
DefaultValue = defaultValue ?? "",
|
||||
SpecialTypeValue = specialTypeValue ?? ""
|
||||
};
|
||||
|
||||
return newField;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user