protected void SetEventState(EventType eventType, bool eventState) { if (EventStateDictionary[eventType] != eventState) { EventStateDictionary[eventType] = eventState; var e = new EventStateSwitchedEventArgs(this, EventStateDictionary[eventType], eventType); OnEventStateSwitched(e); } }
protected void OnEventStateSwitched(EventStateSwitchedEventArgs e) { Volatile.Read(ref EventStateSwitched)?.Invoke(this, e); }