//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- private void SetState(BLEDeviceState state) { if (this.state != state) { BLEDeviceState oldState = this.state; this.state = state; StateChanged?.Invoke(this, new BLEDeviceStateChangedEventArgs(oldState, state)); } }
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\ #region --Constructors-- public BLEDeviceStateChangedEventArgs(BLEDeviceState oldState, BLEDeviceState newState) { OLD_STATE = oldState; NEW_STATE = newState; }