Table of Contents

Class YamlDataStore<T>

Namespace
Uncreated.Warfare.Configuration
Assembly
Uncreated.Warfare.dll
public class YamlDataStore<T> : IDisposable

Type Parameters

T
Inheritance
YamlDataStore<T>
Implements
Inherited Members

Constructors

YamlDataStore(string, ILogger, bool, Func<T>?)

public YamlDataStore(string filePath, ILogger logger, bool reloadOnFileChanged, Func<T>? loadDefault = null)

Parameters

filePath string
logger ILogger
reloadOnFileChanged bool
loadDefault Func<T>

Properties

Data

public T Data { get; }

Property Value

T

LastLoaded

public DateTime LastLoaded { get; }

Property Value

DateTime

OnFileReload

public Action<YamlDataStore<T>>? OnFileReload { get; set; }

Property Value

Action<YamlDataStore<T>>

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Reload()

public void Reload()

Save()

public void Save()