コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DetailViewListItem" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="slider">slider.</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="textButton">textButton.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="stepper">stepper.</param>
 /// <param name="state">state.</param>
 /// <param name="multiArgCommand">multiArgCommand.</param>
 /// <param name="component">component (default to &quot;main&quot;).</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public DetailViewListItem(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), ToggleSwitch toggleSwitch = default(ToggleSwitch), StandbyPowerSwitch standbyPowerSwitch = default(StandbyPowerSwitch), Switch _switch = default(Switch), Slider slider = default(Slider), PushButton pushButton = default(PushButton), TextButton textButton = default(TextButton), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), ListForDetailView list = default(ListForDetailView), TextField textField = default(TextField), NumberField numberField = default(NumberField), Stepper stepper = default(Stepper), State state = default(State), MultiArgCommand multiArgCommand = default(MultiArgCommand), string component = "main", VisibleCondition visibleCondition = default(VisibleCondition))
 {
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for DetailViewListItem and cannot be null");
     }
     this.Capability = capability;
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for DetailViewListItem and cannot be null");
     }
     this.Label              = label;
     this.DisplayType        = displayType;
     this._Version           = version;
     this.ToggleSwitch       = toggleSwitch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.Switch             = _switch;
     this.Slider             = slider;
     this.PushButton         = pushButton;
     this.TextButton         = textButton;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.List            = list;
     this.TextField       = textField;
     this.NumberField     = numberField;
     this.Stepper         = stepper;
     this.State           = state;
     this.MultiArgCommand = multiArgCommand;
     // use default value if no "component" provided
     this.Component        = component ?? "main";
     this.VisibleCondition = visibleCondition;
 }
コード例 #2
0
 public DisplayInGridAttribute(DisplayTypeEnum displayType, int order, int width = 0)
 {
     DisplayType = displayType;
     Order       = order;
     Visible     = true;
     Width       = width;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BasicPlusItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="stepper">stepper.</param>
 /// <param name="feature">Including a basicPlus item with the “feature” display type adds a shortcut item to the desired detail view..</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public BasicPlusItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), Stepper stepper = default(Stepper), List <Object> feature = default(List <Object>), VisibleCondition visibleCondition = default(VisibleCondition))
 {
     this.DisplayType      = displayType;
     this.Stepper          = stepper;
     this.Feature          = feature;
     this.VisibleCondition = visibleCondition;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationListItem" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="enumSlider">enumSlider.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 /// <param name="exclusion">To exclude specified automation in &#x60;exclude&#x60; when this item is selected by the user..</param>
 /// <param name="component">component (default to &quot;main&quot;).</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public AutomationListItem(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), EnumSliderForAutomationCondition enumSlider = default(EnumSliderForAutomationCondition), bool emphasis = default(bool), List <ExcludedConditionItem> exclusion = default(List <ExcludedConditionItem>), string component = "main", VisibleCondition visibleCondition = default(VisibleCondition))
 {
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for AutomationListItem and cannot be null");
     }
     this.Capability = capability;
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for AutomationListItem and cannot be null");
     }
     this.Label       = label;
     this.DisplayType = displayType;
     this._Version    = version;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.EnumSlider  = enumSlider;
     this.Emphasis    = emphasis;
     this.Exclusion   = exclusion;
     // use default value if no "component" provided
     this.Component        = component ?? "main";
     this.VisibleCondition = visibleCondition;
 }
コード例 #5
0
 public DisplayInGridAttribute(string title, DisplayTypeEnum displayType, int width, int order)
 {
     Width       = width;
     DisplayType = displayType;
     Title       = title;
     Visible     = width > 0;
     Order       = order;
 }
コード例 #6
0
ファイル: State.cs プロジェクト: aryanagarkar/MathGame
 public State(Grade grade, Journey journey, Topic topic, int difficulty, DisplayTypeEnum displayType)
 {
     this.grade       = grade;
     this.journey     = journey;
     this.topic       = topic;
     this.difficulty  = difficulty;
     this.displayType = displayType;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiArgCommandArguments" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 public MultiArgCommandArguments(DisplayTypeEnum displayType = default(DisplayTypeEnum), SwitchForArgument _switch = default(SwitchForArgument), SliderForArgument slider = default(SliderForArgument), ListForArgument list = default(ListForArgument), TextFieldForArgument textField = default(TextFieldForArgument), NumberFieldForArgument numberField = default(NumberFieldForArgument))
 {
     this.DisplayType = displayType;
     this.Switch      = _switch;
     this.Slider      = slider;
     this.List        = list;
     this.TextField   = textField;
     this.NumberField = numberField;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItemAllOf" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 public ActionItemAllOf(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string))
 {
     this.DisplayType        = displayType;
     this.PushButton         = pushButton;
     this.ToggleSwitch       = toggleSwitch;
     this.Switch             = _switch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.Group = group;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationForCapabilityConditions" /> class.
 /// </summary>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationForCapabilityConditions(string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), bool emphasis = default(bool))
 {
     // to ensure "label" is required (not null)
     this.Label       = label ?? throw new ArgumentNullException("label is a required property for AutomationForCapabilityConditions and cannot be null");
     this.DisplayType = displayType;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.Emphasis    = emphasis;
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BasicPlusArrayItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="stepper">stepper.</param>
 /// <param name="feature">Including a basicPlus item with the “feature” display type adds a shortcut item to the desired detail view..</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="component">component.</param>
 public BasicPlusArrayItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), Stepper stepper = default(Stepper), List <Object> feature = default(List <Object>), VisibleCondition visibleCondition = default(VisibleCondition), string capability = default(string), int version = 1, string component = default(string))
 {
     this.DisplayType = displayType;
     // to ensure "capability" is required (not null)
     this.Capability       = capability ?? throw new ArgumentNullException("capability is a required property for BasicPlusArrayItem and cannot be null");
     this.Stepper          = stepper;
     this.Feature          = feature;
     this.VisibleCondition = visibleCondition;
     this.Version          = version;
     this.Component        = component;
 }
コード例 #11
0
ファイル: ActionItem.cs プロジェクト: daltskin/SmartThingsNet
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItem" /> class.
 /// </summary>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="statelessPowerToggle">statelessPowerToggle.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard. (default to &quot;main&quot;).</param>
 public ActionItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), StatelessPowerToggleForDashboard statelessPowerToggle = default(StatelessPowerToggleForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = "main")
 {
     this.DisplayType          = displayType;
     this.PushButton           = pushButton;
     this.ToggleSwitch         = toggleSwitch;
     this.Switch               = _switch;
     this.StandbyPowerSwitch   = standbyPowerSwitch;
     this.StatelessPowerToggle = statelessPowerToggle;
     this.PlayPause            = playPause;
     this.PlayStop             = playStop;
     // use default value if no "group" provided
     this.Group = group ?? "main";
 }
コード例 #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultiArgCommandArguments" /> class.
 /// </summary>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;list\&quot; here, you must also include the \&quot;list\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 public MultiArgCommandArguments(string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForArgument slider = default(SliderForArgument), ListForArgument list = default(ListForArgument), TextFieldForArgument textField = default(TextFieldForArgument), NumberFieldForArgument numberField = default(NumberFieldForArgument))
 {
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for MultiArgCommandArguments and cannot be null");
     }
     this.Label       = label;
     this.DisplayType = displayType;
     this.Slider      = slider;
     this.List        = list;
     this.TextField   = textField;
     this.NumberField = numberField;
 }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationAction" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="multiArgCommand">multiArgCommand.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationAction(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationAction slider = default(SliderForAutomationAction), ListForAutomationAction list = default(ListForAutomationAction), TextFieldForAutomationAction textField = default(TextFieldForAutomationAction), NumberFieldForAutomationAction numberField = default(NumberFieldForAutomationAction), MultiArgCommand multiArgCommand = default(MultiArgCommand), bool emphasis = default(bool))
 {
     // to ensure "capability" is required (not null)
     this.Capability = capability ?? throw new ArgumentNullException("capability is a required property for AutomationAction and cannot be null");
     // to ensure "label" is required (not null)
     this.Label           = label ?? throw new ArgumentNullException("label is a required property for AutomationAction and cannot be null");
     this.DisplayType     = displayType;
     this.Version         = version;
     this.Slider          = slider;
     this.List            = list;
     this.TextField       = textField;
     this.NumberField     = numberField;
     this.MultiArgCommand = multiArgCommand;
     this.Emphasis        = emphasis;
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationListItem" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 /// <param name="component">component.</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public AutomationListItem(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), bool emphasis = default(bool), string component = default(string), VisibleCondition visibleCondition = default(VisibleCondition))
 {
     // to ensure "capability" is required (not null)
     this.Capability = capability ?? throw new ArgumentNullException("capability is a required property for AutomationListItem and cannot be null");
     // to ensure "label" is required (not null)
     this.Label            = label ?? throw new ArgumentNullException("label is a required property for AutomationListItem and cannot be null");
     this.DisplayType      = displayType;
     this.Version          = version;
     this.Slider           = slider;
     this.List             = list;
     this.NumberField      = numberField;
     this.TextField        = textField;
     this.Emphasis         = emphasis;
     this.Component        = component;
     this.VisibleCondition = visibleCondition;
 }
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionsArrayItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="component">component.</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public ActionsArrayItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string), string capability = default(string), int version = 1, string component = default(string), VisibleCondition visibleCondition = default(VisibleCondition))
 {
     this.DisplayType = displayType;
     // to ensure "capability" is required (not null)
     this.Capability         = capability ?? throw new ArgumentNullException("capability is a required property for ActionsArrayItem and cannot be null");
     this.PushButton         = pushButton;
     this.ToggleSwitch       = toggleSwitch;
     this.Switch             = _switch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.Group            = group;
     this.Version          = version;
     this.Component        = component;
     this.VisibleCondition = visibleCondition;
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationActionAllOf" /> class.
 /// </summary>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="multiArgCommand">multiArgCommand.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationActionAllOf(string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationAction slider = default(SliderForAutomationAction), ListForAutomationAction list = default(ListForAutomationAction), TextFieldForAutomationAction textField = default(TextFieldForAutomationAction), NumberFieldForAutomationAction numberField = default(NumberFieldForAutomationAction), MultiArgCommand multiArgCommand = default(MultiArgCommand), bool emphasis = default(bool))
 {
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for AutomationActionAllOf and cannot be null");
     }
     this.Label           = label;
     this.DisplayType     = displayType;
     this.Slider          = slider;
     this.List            = list;
     this.TextField       = textField;
     this.NumberField     = numberField;
     this.MultiArgCommand = multiArgCommand;
     this.Emphasis        = emphasis;
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DetailViewItemAllOf" /> class.
 /// </summary>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="slider">slider.</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="list">list.</param>
 /// <param name="textField">textField.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="stepper">stepper.</param>
 /// <param name="state">state.</param>
 /// <param name="multiArgCommand">multiArgCommand.</param>
 public DetailViewItemAllOf(string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), ToggleSwitch toggleSwitch = default(ToggleSwitch), StandbyPowerSwitch standbyPowerSwitch = default(StandbyPowerSwitch), SwitchObj _switch = default(SwitchObj), Slider slider = default(Slider), PushButton pushButton = default(PushButton), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), ListForDetailView list = default(ListForDetailView), TextField textField = default(TextField), NumberField numberField = default(NumberField), Stepper stepper = default(Stepper), State state = default(State), MultiArgCommand multiArgCommand = default(MultiArgCommand))
 {
     // to ensure "label" is required (not null)
     this.Label              = label ?? throw new ArgumentNullException("label is a required property for DetailViewItemAllOf and cannot be null");
     this.DisplayType        = displayType;
     this.ToggleSwitch       = toggleSwitch;
     this.StandbyPowerSwitch = standbyPowerSwitch;
     this.Switch             = _switch;
     this.Slider             = slider;
     this.PushButton         = pushButton;
     this.PlayPause          = playPause;
     this.PlayStop           = playStop;
     this.List            = list;
     this.TextField       = textField;
     this.NumberField     = numberField;
     this.Stepper         = stepper;
     this.State           = state;
     this.MultiArgCommand = multiArgCommand;
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutomationCondition" /> class.
 /// </summary>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="label">label (required).</param>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="slider">slider.</param>
 /// <param name="list">list.</param>
 /// <param name="numberField">numberField.</param>
 /// <param name="textField">textField.</param>
 /// <param name="enumSlider">enumSlider.</param>
 /// <param name="emphasis">The effect used to emphasize this resource widget. The default value is false. If the emphasis value is true and this object has alternatives, a list will appear without a label.</param>
 public AutomationCondition(string capability = default(string), int version = 1, string label = default(string), DisplayTypeEnum displayType = default(DisplayTypeEnum), SliderForAutomationCondition slider = default(SliderForAutomationCondition), ListForAutomationCondition list = default(ListForAutomationCondition), NumberFieldForAutomationCondition numberField = default(NumberFieldForAutomationCondition), TextFieldForAutomationCondition textField = default(TextFieldForAutomationCondition), EnumSliderForAutomationCondition enumSlider = default(EnumSliderForAutomationCondition), bool emphasis = default(bool))
 {
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for AutomationCondition and cannot be null");
     }
     this.Capability = capability;
     // to ensure "label" is required (not null)
     if (label == null)
     {
         throw new ArgumentNullException("label is a required property for AutomationCondition and cannot be null");
     }
     this.Label       = label;
     this.DisplayType = displayType;
     this._Version    = version;
     this.Slider      = slider;
     this.List        = list;
     this.NumberField = numberField;
     this.TextField   = textField;
     this.EnumSlider  = enumSlider;
     this.Emphasis    = emphasis;
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionsArrayItem" /> class.
 /// </summary>
 /// <param name="displayType">To specify the type of UI component to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="statelessPowerToggle">statelessPowerToggle.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard. (default to &quot;main&quot;).</param>
 /// <param name="capability">capability (required).</param>
 /// <param name="version">The version number of the capability. (default to 1).</param>
 /// <param name="component">component (default to &quot;main&quot;).</param>
 /// <param name="visibleCondition">visibleCondition.</param>
 public ActionsArrayItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), StatelessPowerToggleForDashboard statelessPowerToggle = default(StatelessPowerToggleForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = "main", string capability = default(string), int version = 1, string component = "main", VisibleCondition visibleCondition = default(VisibleCondition))
 {
     this.DisplayType = displayType;
     // to ensure "capability" is required (not null)
     if (capability == null)
     {
         throw new ArgumentNullException("capability is a required property for ActionsArrayItem and cannot be null");
     }
     this.Capability           = capability;
     this.PushButton           = pushButton;
     this.ToggleSwitch         = toggleSwitch;
     this.Switch               = _switch;
     this.StandbyPowerSwitch   = standbyPowerSwitch;
     this.StatelessPowerToggle = statelessPowerToggle;
     this.PlayPause            = playPause;
     this.PlayStop             = playStop;
     // use default value if no "group" provided
     this.Group    = group ?? "main";
     this._Version = version;
     // use default value if no "component" provided
     this.Component        = component ?? "main";
     this.VisibleCondition = visibleCondition;
 }
コード例 #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionItem" /> class.
 /// </summary>
 /// <param name="displayType">Specify the type of UI component to use to display this action or state. The corresponding field must also be included. For example, if you specify \&quot;switch\&quot; here, you must also include the \&quot;switch\&quot; key and its object definition for this action or state. (required).</param>
 /// <param name="pushButton">pushButton.</param>
 /// <param name="toggleSwitch">toggleSwitch.</param>
 /// <param name="_switch">_switch.</param>
 /// <param name="standbyPowerSwitch">standbyPowerSwitch.</param>
 /// <param name="playPause">playPause.</param>
 /// <param name="playStop">playStop.</param>
 /// <param name="group">The group name to which this belongs. Some complex devices can be shown grouped in the dashboard card. This is used for grouping states and actions in the dashboard..</param>
 public ActionItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), PushButton pushButton = default(PushButton), ToggleSwitchForDashboard toggleSwitch = default(ToggleSwitchForDashboard), SwitchForDashboard _switch = default(SwitchForDashboard), StandbyPowerSwitchForDashboard standbyPowerSwitch = default(StandbyPowerSwitchForDashboard), PlayPause playPause = default(PlayPause), PlayStop playStop = default(PlayStop), string group = default(string)) : base()
 {
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Market" /> class.
 /// </summary>
 /// <param name="betDelay">How much is the bet delay for this market,\&quot; the interval between order placement and acceptance (required).</param>
 /// <param name="cashoutEnabled"> Cashout enabled determines whether instant cashout is enabled for this market. If true, trading out of this market will cause the settlement result to be immediatelly reflected in the customer&#x27;s balance (before the final settlement of the market). (required).</param>
 /// <param name="category">Category of this market.</param>
 /// <param name="complete">Complete markets cannot have additional contracts added after market creation (required).</param>
 /// <param name="contractSelections"> These particular contracts are not related to markets in the same way that most contracts are related to markets.&lt;br&gt; The contract_selections field is only set for accumulator markets and it refers to the contract IDs that the acca is made up of, an example:&lt;br&gt; &lt;br&gt; M1 (Winner market in Man Utd - Liverpool) &lt;ul&gt; &lt;li&gt;M1-C1 (Man Utd) &lt;li&gt;M1-C2 (Draw) &lt;li&gt;M1-C3 (Liverpool) &lt;/ul&gt; &lt;/ul&gt; M2 (Winner market in Arsenal - Chelsea) &lt;ul&gt; &lt;li&gt;M2-C1 (Arsenal) &lt;li&gt;M2-C2 (Draw) &lt;li&gt;M2-C3 (Chelsea) &lt;/ul&gt; &lt;br&gt; Now an accumulator market is created:&lt;br&gt; M3 (Man Utd and Arsenal both to win on 23rd of February) &lt;ul&gt; &lt;li&gt;M3-C1 (Yes) &lt;li&gt;M3-C2 (No) &lt;/ul&gt; &lt;br&gt; In this case, M3 will have two contracts (M3-C1 and M3-C2) but contract_selections will be M1-C1 (Man Utd) and M2-C1 (Arsenal).&lt;br&gt;.</param>
 /// <param name="created">When was the market created in the Smarkets exchange (required).</param>
 /// <param name="description">A summary about this market.</param>
 /// <param name="displayOrder">Markets are sorted in the website according to these numbers in descending order.</param>
 /// <param name="displayType"> The display type can be used by frontend to define how the odds of the contracts of&lt;br&gt; the market will appear on the website. (required) (default to DisplayTypeEnum.Default).</param>
 /// <param name="eventId">This ID uniquely identifies an event (required).</param>
 /// <param name="hidden">Hidden markets aren&#x27;t displayed in our website (required).</param>
 /// <param name="id">This ID uniquely identifies the market (required).</param>
 /// <param name="inplayEnabled">True if trading will be open when the markets go live in-play.</param>
 /// <param name="marketType">marketType (required).</param>
 /// <param name="modified">The datetime of the last modification made by Smarkets to the market properties (required).</param>
 /// <param name="name"> Name of the market. This field is for display purposes and should not be used to identify the market.&lt;br&gt; The market_type field should be used instead. (required).</param>
 /// <param name="slug"> Slug concisely represents the market.&lt;br&gt; It should not be used to identify the market.&lt;br&gt; The market_type field should be used instead. (required).</param>
 /// <param name="state"> Market state can have the following values:&lt;br&gt; -new: just created, still not open for trading&lt;br&gt; -open: open for trading not live in-play&lt;br&gt; -live: open for trading, live in-play&lt;br&gt; -halted: trading is halted temporarily, usually due to material events&lt;br&gt; -settled: traded has ceased and the market has settled&lt;br&gt; -voided: the market was voided and no winner was chosen&lt;br&gt; -unavailable: the maret is not available for betting (required).</param>
 /// <param name="winnerCount"> How many winners will the market have.&lt;br&gt; Usually this number is 1, except for \&quot;To Place\&quot;, \&quot;Top x Finish\&quot; type markets      (required).</param>
 public Market(int?betDelay = default(int?), bool?cashoutEnabled = default(bool?), CategoryEnum?category = default(CategoryEnum?), bool?complete = default(bool?), List <int?> contractSelections = default(List <int?>), DateTime?created = default(DateTime?), string description = default(string), int?displayOrder = default(int?), DisplayTypeEnum displayType = DisplayTypeEnum.Default, string eventId = default(string), bool?hidden = default(bool?), string id = default(string), bool?inplayEnabled = default(bool?), AccountActivityResponseMarketType marketType = default(AccountActivityResponseMarketType), DateTime?modified = default(DateTime?), string name = default(string), string slug = default(string), StateEnum state = default(StateEnum), int?winnerCount = default(int?))
 {
     // to ensure "betDelay" is required (not null)
     if (betDelay == null)
     {
         throw new InvalidDataException("betDelay is a required property for Market and cannot be null");
     }
     else
     {
         this.BetDelay = betDelay;
     }
     // to ensure "cashoutEnabled" is required (not null)
     if (cashoutEnabled == null)
     {
         throw new InvalidDataException("cashoutEnabled is a required property for Market and cannot be null");
     }
     else
     {
         this.CashoutEnabled = cashoutEnabled;
     }
     // to ensure "complete" is required (not null)
     if (complete == null)
     {
         throw new InvalidDataException("complete is a required property for Market and cannot be null");
     }
     else
     {
         this.Complete = complete;
     }
     // to ensure "created" is required (not null)
     if (created == null)
     {
         throw new InvalidDataException("created is a required property for Market and cannot be null");
     }
     else
     {
         this.Created = created;
     }
     // to ensure "displayType" is required (not null)
     if (displayType == null)
     {
         throw new InvalidDataException("displayType is a required property for Market and cannot be null");
     }
     else
     {
         this.DisplayType = displayType;
     }
     // to ensure "eventId" is required (not null)
     if (eventId == null)
     {
         throw new InvalidDataException("eventId is a required property for Market and cannot be null");
     }
     else
     {
         this.EventId = eventId;
     }
     // to ensure "hidden" is required (not null)
     if (hidden == null)
     {
         throw new InvalidDataException("hidden is a required property for Market and cannot be null");
     }
     else
     {
         this.Hidden = hidden;
     }
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for Market and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "marketType" is required (not null)
     if (marketType == null)
     {
         throw new InvalidDataException("marketType is a required property for Market and cannot be null");
     }
     else
     {
         this.MarketType = marketType;
     }
     // to ensure "modified" is required (not null)
     if (modified == null)
     {
         throw new InvalidDataException("modified is a required property for Market and cannot be null");
     }
     else
     {
         this.Modified = modified;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for Market and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "slug" is required (not null)
     if (slug == null)
     {
         throw new InvalidDataException("slug is a required property for Market and cannot be null");
     }
     else
     {
         this.Slug = slug;
     }
     // to ensure "state" is required (not null)
     if (state == null)
     {
         throw new InvalidDataException("state is a required property for Market and cannot be null");
     }
     else
     {
         this.State = state;
     }
     // to ensure "winnerCount" is required (not null)
     if (winnerCount == null)
     {
         throw new InvalidDataException("winnerCount is a required property for Market and cannot be null");
     }
     else
     {
         this.WinnerCount = winnerCount;
     }
     this.Category           = category;
     this.ContractSelections = contractSelections;
     this.Description        = description;
     this.DisplayOrder       = displayOrder;
     this.InplayEnabled      = inplayEnabled;
 }
コード例 #22
0
        private void Init(FileInfo info,bool keepFileContent)
        {
            _content="";
            currentMD5 = new byte[16];
            _informations =info;
            md5Changed =false;

            if((_keepFileContent=keepFileContent))
            {
                UpdateContent();
            }

            ComputeMd5(true);

            _DisplayType= DisplayTypeEnum.Undefined;
        }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BasicPlusItem" /> class.
 /// </summary>
 /// <param name="displayType">To specify the type of UI component to display this basicPlus item. The corresponding field must also be included. For example, if you specify \&quot;camera\&quot; here, you must also include the \&quot;camera\&quot; key and its object definition for this basicPlus item. (required).</param>
 /// <param name="camera">camera.</param>
 public BasicPlusItem(DisplayTypeEnum displayType = default(DisplayTypeEnum), Camera camera = default(Camera))
 {
     this.DisplayType = displayType;
     this.Camera      = camera;
 }