This repository has been archived on 2026-01-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SessionZero-Client/SessionZero/Data/SzDataObjectTemplate.cs

19 lines
535 B
C#

using System;
using Tomlyn.Model;
namespace SessionZero.Data;
public class SzDataObjectTemplate : SzTemplate
{
public string DataType { get; set; }
public override void ParseAdditionalMetaData(TomlTable table)
{
if (!table.ContainsKey("metadata") || table["metadata"] is not TomlTable metadata) return;
if (metadata.TryGetValue("data_type", out var tempTypeVal))
{
DataType = tempTypeVal?.ToString() ?? throw new Exception("Template missing type metadata");
}
}
}