mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-02 15:50:47 +08:00
22 lines
414 B
C#
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();
|
|
}
|
|
}
|
|
}
|