private void ISink_DeviceDisconnected(object sender, DeviceConnectEventArgs e) { EventHandler h = UnsafeThreadDeviceDisconnectedNotice; if (h != null) { try { h(this, EventArgs.Empty); } catch { } } StartInvokeThread(new DeviceEventDelegate(DeviceDisconnecting), RemoteDevice.GetDeviceInfo(e.Device)); }
protected virtual Task OnDeviceDidConnect(DeviceConnectEventArgs args) { this.DeviceDidConnect?.Invoke(this, args); return(Task.CompletedTask); }