private void _usbSleep(bool isSleeping, DateTime eventTime) { SleepEventHandler handler = SleepSuspend; if (handler == null) { return; } handler(this, isSleeping, eventTime); }
private void UsbSleep(Boolean isSleeping, DateTime eventTime) { SleepEventHandler handler = SleepSuspend; handler?.Invoke(this, isSleeping, eventTime); }
public void SubscribeSleepChanges(SleepEventHandler e) { if (OnSleepChanged == null) OnSleepChanged = new SleepEventHandler(e); else OnSleepChanged += new SleepEventHandler(e); }