API ReferenceEditor
MetaDataclass
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.
object→MetaData
Methods7
Showing 7 methods
public T Get(string keyName, T defaultValue = null)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
| defaultValue = null | T | — |
Returns:
T—public bool GetBool(string keyName, bool defaultValue = False)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
| defaultValue = False | bool | — |
Returns:
bool—public System.Nullable`1<System.Text.Json.JsonElement> GetElement(string keyName)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
Returns:
Nullable<JsonElement>—public float GetFloat(string keyName, float defaultValue = 0)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
| defaultValue = 0 | float | — |
Returns:
float—public int GetInt(string keyName, int defaultValue = 0)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
| defaultValue = 0 | int | — |
Returns:
int—public string GetString(string keyName, string defaultValue = null)
| Parameter | Type | Description |
|---|---|---|
| keyName | string | — |
| defaultValue = null | string | — |
Returns:
string—public void Set(string name, T value)
Set a value in the metadata file. If the value is null, the key will be removed.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| value | T | — |
Returns:
void—No results match this filter.
Properties1
Showing 1 properties
public string Editor.MetaData.FilePath { get; set; }
File path to the metadata file.
Returns:
string—No results match this filter.