More work on SzDataHandler

This commit is contained in:
2026-01-28 22:02:58 -06:00
parent 97c8128176
commit 5265ceb0da
2 changed files with 18 additions and 2 deletions

View File

@@ -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;

View File

@@ -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