namespace HyperBooru.Services; public interface IUserService { public bool ShowNsfw { get; set; } public event EventHandler ShowNsfwChanged; } public class UserService : IUserService { public bool ShowNsfw { get => showNsfw; set { showNsfw = value; ShowNsfwChanged?.Invoke(this, value); } } public event EventHandler ShowNsfwChanged; private bool showNsfw = false; }