blob: d2abea39396a0855f17922b4c1583933c9e41b59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
namespace HyperBooru.Services;
public interface IUserService {
public bool ShowNsfw { get; set; }
public event EventHandler<bool> ShowNsfwChanged;
}
public class UserService : IUserService {
public bool ShowNsfw {
get => showNsfw;
set {
showNsfw = value;
ShowNsfwChanged?.Invoke(this, value);
}
}
public event EventHandler<bool> ShowNsfwChanged;
private bool showNsfw = false;
}
|