s&box docs

public class Editor.MetaData

A class to CRUD json files. This should probably be a generic class since it seems like we might want to do this with stuff other than meta files. But there's no need for that right now, so lets leave it simple.

Broader workflow and conceptual references connected to this API.

Methods

Showing 7 methods

public T Get(string keyName, T defaultValue = null)

Parameters

  • defaultValue: Default: null

public bool GetBool(string keyName, bool defaultValue = False)

Parameters

  • defaultValue: Default: False

public System.Nullable`1<System.Text.Json.JsonElement> GetElement(string keyName)

public float GetFloat(string keyName, float defaultValue = 0)

Parameters

  • defaultValue: Default: 0

public int GetInt(string keyName, int defaultValue = 0)

Parameters

  • defaultValue: Default: 0

public string GetString(string keyName, string defaultValue = null)

Parameters

  • defaultValue: Default: null

public void Set(string name, T value)

Set a value in the metadata file. If the value is null, the key will be removed.

Properties

Showing 1 properties

public string Editor.MetaData.FilePath { get; set; }

File path to the metadata file.

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.MetaData

On this page