Added data objects, starting on parser

This commit is contained in:
2026-01-20 11:39:29 -06:00
parent 0a91734a27
commit e0c24250fb
37 changed files with 266 additions and 74 deletions

View File

@@ -0,0 +1,8 @@
namespace SzLib.DataObjects;
public class SzDataObject
{
public required string Name;
public required string Id;
public Dictionary<string, SzField> Fields = [];
}

View File

@@ -0,0 +1,10 @@
namespace SzLib.DataObjects;
public class SzDataObjectTemplate
{
public required string Name;
public required string Id;
public Guid? Uuid;
public required string DataObjectType;
public Dictionary<string, SzTemplateField> TemplateFields = [];
}

View File

@@ -0,0 +1,12 @@
namespace SzLib.DataObjects;
public class SzDataset
{
public required string Name;
public required string Id;
public Guid? Uuid;
public required string DataObjectType;
public required string DataObjectTemplateId;
public Dictionary<string, SzDataObject> DataObjects = [];
}

View File

@@ -0,0 +1,9 @@
namespace SzLib.DataObjects;
public class SzField
{
public required string Id;
public required SzFieldType FieldType;
public bool IsList = false;
public string Value = "";
}

View File

@@ -0,0 +1,6 @@
namespace SzLib.DataObjects;
public enum SzFieldType
{
Text, Number, Bool, Formula, Ref
}

View File

@@ -0,0 +1,11 @@
namespace SzLib.DataObjects;
public class SzTemplateField
{
public required string Name;
public required string Id;
public bool IsList = false;
public string DefaultValue = "";
public bool IsSpecialType = false;
public string SpecialTypeValue = "";
}

6
SzLib/ISzFileManager.cs Normal file
View File

@@ -0,0 +1,6 @@
namespace SzLib;
public interface ISzFileManager
{
public Path DataPath {get; set;}
}

6
SzLib/SzParser.cs Normal file
View File

@@ -0,0 +1,6 @@
namespace SzLib;
public class SzParser(ISzFileManager szFileManager)
{
public readonly ISzFileManager FileManager = szFileManager;
}

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("SzLib")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0a91734a27836b548e422e7f53f42a86a6e65aa0")]
[assembly: System.Reflection.AssemblyProductAttribute("SzLib")]
[assembly: System.Reflection.AssemblyTitleAttribute("SzLib")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
80c4d268bae2ab39e969427907169a51964e621c
c4fac1ee3ada9b23fef8f772fe12079089fe1f0f9fd88ed354bd91dd8a45b58a

View File

@@ -1,10 +1,17 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = SzLib
build_property.ProjectDir = /data/Projects/bellsworne/sessionzero/SessionZeroCS/SessionZero/SzLib/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -1,8 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
global using System;
global using System.Collections.Generic;
global using System.IO;
global using System.Linq;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;