Class EnumeratedSetting
The class for a setting with an explicit list of acceptable values.
Inherited Members
Namespace: Phoenix.Devices
Assembly: Phoenix.Devices.Xbox.dll
Syntax
public class EnumeratedSetting : XboxConfigSetting
Constructors
View SourceEnumeratedSetting(String, Object, IEnumerable<Object>, Boolean)
Initializes a new instance of the EnumeratedSetting class using a specified list of acceptable values.
Declaration
public EnumeratedSetting(string friendlyName, object initialValue, IEnumerable<object> acceptedValues, bool hasNonMatchingProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | friendlyName | User-friendly name of the setting |
System.Object | initialValue | Initial value of the setting |
System.Collections.Generic.IEnumerable<System.Object> | acceptedValues | Acceptable values for this setting |
System.Boolean | hasNonMatchingProperties | Whether or not the setting has non matching properties among the selected devices |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | initialValue must be an accepted value |
EnumeratedSetting(String, Object, Type, Boolean)
Initializes a new instance of the EnumeratedSetting class based on an existing enumeration.
Declaration
public EnumeratedSetting(string friendlyName, object initialValue, Type enumType, bool hasNonMatchingProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | friendlyName | User-friendly name of the setting |
System.Object | initialValue | Initial value of the setting |
System.Type | enumType | Type of the setting (must be an enumeration type) |
System.Boolean | hasNonMatchingProperties | Whether or not the setting has non matching properties among the selected devices |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | initialValue must be an accepted value |
Properties
View SourceAcceptedValues
Gets the acceptable values for this setting.
Declaration
public IEnumerable<object> AcceptedValues { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
Methods
View SourceValidateValue(Object)
Called to validate that a value is acceptable.
Declaration
protected override bool ValidateValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if valid. |