1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-09-06 07:53:11 +02:00
Files
Minecraft-Phantom-Panel/Utils/Phantom.Utils.Events/SimpleObservableState.cs
2025-08-21 20:31:21 +02:00

21 lines
403 B
C#

using Serilog;
namespace Phantom.Utils.Events;
public sealed class SimpleObservableState<T> : ObservableState<T> {
public T Value { get; private set; }
public SimpleObservableState(ILogger logger, T initialValue) : base(logger) {
this.Value = initialValue;
}
public void SetTo(T newValue) {
this.Value = newValue;
Update();
}
protected override T GetData() {
return Value;
}
}