void _actionCheckAndExecute(EventHandler handler, GPIPin pin, byte deviceId, byte port, byte bit) { if (pin != null && deviceId == pin.DeviceId && port == pin.PortNumber && bit == pin.PinNumber) { Debug.WriteLine("Advantech device {0} notification port {1} bit {2}", deviceId, port, bit); handler?.Invoke(this, EventArgs.Empty); } }
private void _actionCheckAndExecute(EventHandler handler, GPIPin pin, byte deviceId, byte port, byte bit) { if (pin == null || deviceId != pin.DeviceId || port != pin.PortNumber || bit != pin.PinNumber) { return; } Debug.WriteLine("Advantech device {0} notification port {1} bit {2}", deviceId, port, bit); handler?.Invoke(this, EventArgs.Empty); }