namespace Stary.Evo.Example.Counter { public interface ICounterData : IData { BindableProperty Count { get; } } public class CounterData : AbstractData, ICounterData { public override void Dispose() { } protected override void OnInit() { var storage = this.GetUtility(); Count.Value = storage.LoadInt("COUNTER_COUNT", 0); Count.Register( count => { storage.SaveInt("COUNTER_COUNT", count); }); } public BindableProperty Count { get; } = new BindableProperty() { Value = 0 }; } }