public StateMachineState ConnectApplyStateWith(Button button) { if (button == null) throw new ArgumentNullException(nameof(button)); button.WithShortAction(() => _stateMachine.ApplyState(Id)); return this; }
public RollerShutterButtons(string id, IBinaryInput upInput, IBinaryInput downInput, IHttpRequestController httpRequestController, INotificationHandler notificationHandler, IHomeAutomationTimer timer) : base(id, httpRequestController, notificationHandler) { if (upInput == null) throw new ArgumentNullException(nameof(upInput)); if (downInput == null) throw new ArgumentNullException(nameof(downInput)); Up = new Button(id + "-up", upInput, httpRequestController, notificationHandler, timer); Down = new Button(id + "-down", downInput, httpRequestController, notificationHandler, timer); }