Files
serein-flow/Serein.CloudWorkbench/Services/CounterService.cs
2025-03-14 16:04:06 +08:00

22 lines
414 B
C#

namespace Serein.CloudWorkbench.Services
{
public class CounterService
{
public int Count { get; private set; } = 0;
public event Action? OnCountChanged;
public void Increment()
{
Count++;
OnCountChanged?.Invoke();
}
public void Decrement()
{
Count--;
OnCountChanged?.Invoke();
}
}
}