コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SwitchCommand" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 public SwitchCommand(SwitchCommandCommand command = default(SwitchCommandCommand))
 {
     // to ensure "command" is required (not null)
     if (command == null)
     {
         throw new ArgumentNullException("command is a required property for SwitchCommand and cannot be null");
     }
     this.Command = command;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StandbyPowerSwitch" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 /// <param name="state">state.</param>
 public StandbyPowerSwitch(SwitchCommandCommand command = default(SwitchCommandCommand), SwitchStateState state = default(SwitchStateState))
 {
     // to ensure "command" is required (not null)
     if (command == null)
     {
         throw new ArgumentNullException("command is a required property for StandbyPowerSwitch and cannot be null");
     }
     this.Command = command;
     this.State   = state;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToggleSwitchForDashboard" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 /// <param name="state">state.</param>
 public ToggleSwitchForDashboard(SwitchCommandCommand command = default(SwitchCommandCommand), SwitchStateForDashboardState state = default(SwitchStateForDashboardState))
 {
     // to ensure "command" is required (not null)
     if (command == null)
     {
         throw new ArgumentNullException("command is a required property for ToggleSwitchForDashboard and cannot be null");
     }
     this.Command = command;
     this.State   = state;
 }
コード例 #4
0
ファイル: SwitchObj.cs プロジェクト: sm0lle/SmartThingsNet
 /// <summary>
 /// Initializes a new instance of the <see cref="SwitchObj" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 /// <param name="state">state.</param>
 public SwitchObj(SwitchCommandCommand command = default(SwitchCommandCommand), SwitchStateState state = default(SwitchStateState))
 {
     // to ensure "command" is required (not null)
     this.Command = command ?? throw new ArgumentNullException("command is a required property for SwitchObj and cannot be null");
     this.State   = state;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StandbyPowerSwitchForDashboard" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 /// <param name="state">state.</param>
 public StandbyPowerSwitchForDashboard(SwitchCommandCommand command = default(SwitchCommandCommand), SwitchStateForDashboardState state = default(SwitchStateForDashboardState)) : base()
 {
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToggleSwitchForDashboard" /> class.
 /// </summary>
 /// <param name="command">command (required).</param>
 /// <param name="state">state.</param>
 public ToggleSwitchForDashboard(SwitchCommandCommand command = default(SwitchCommandCommand), SwitchStateForDashboardState state = default(SwitchStateForDashboardState)) : base()
 {
 }