public DigitalInput() { Executor.Current.Register(this); this.Trigger = new Action<bool>(x => { var handler = StateChanged; if (handler != null) handler(this, new LogicalDevice.Event.StateChangedEventArgs(x)); }); }