Class ConfigurationOptionAttribute
Represents one option in an emulator configuration inside a configuration section. Typically configuration options must be a double, bool, integer or an enum value in order to be safe, type information may be lost when serializing into a wire format.
Inheritance
Inherited Members
Namespace: Snowflake.Configuration.Attributes
Assembly: Snowflake.Framework.Primitives.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class ConfigurationOptionAttribute : Attribute
Constructors
ConfigurationOptionAttribute(String, Boolean)
Initializes a new instance of the Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, bool default)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | |
System. |
default |
ConfigurationOptionAttribute(String, Double)
Initializes a new instance of the Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, double default)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | The name of the option |
System. |
default | The default value of the option. Note that only strings, enums and primitive types are supported. |
ConfigurationOptionAttribute(String, Int32)
Initializes a new instance of the Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, int default)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | |
System. |
default |
ConfigurationOptionAttribute(String, Object)
Initializes a new instance of the Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, object default)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | The name of the option |
System. |
default | The default value of the option. Note that only strings, enums and primitive types are supported. |
ConfigurationOptionAttribute(String, String)
Initializes a new Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, string default)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | The name of the option |
System. |
default | The default value of the option. Note that only strings, enums and primitive types are supported. |
ConfigurationOptionAttribute(String, String, PathType)
Initializes a new Configuration
Declaration
public ConfigurationOptionAttribute(string optionName, string default, PathType pathType)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | The name of the option |
System. |
default | The default value of the option. Note that only strings, enums and primitive types are supported. |
Path |
pathType | The type of the path this points to. |
ConfigurationOptionAttribute(String, String, String)
Initializes a new Configuration
Represents one option in an emulator configuration inside a configuration section. Typically configuration options must be a double, bool, integer or an enum value in order to be safe, type information may be lost when serializing into a wire format.
Declaration
public ConfigurationOptionAttribute(string optionName, string default, string unset)
Parameters
Type | Name | Description |
---|---|---|
System. |
optionName | The name of the option |
System. |
default | The default value of the option. Note that only strings, enums and primitive types are supported. |
System. |
unset |
Properties
Default
Gets the default value of this option.
Declaration
public object Default { get; }
Property Value
Type | Description |
---|---|
System. |
Description
Gets or sets a description of this configuration option
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System. |
DisplayName
Gets or sets the display name for human readable purposes of this option
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System. |
Flag
Gets or sets a value indicating whether a 'flag' property is never serialized into the configuration option, and is instead used to cause side effects to the configuration during emulator instance creation by the emulator handler. If a flag affects the configuration, it should be placed in the same section it modifies.
Declaration
public bool Flag { get; set; }
Property Value
Type | Description |
---|---|
System. |
Increment
Gets or sets the increment to increase a numerical value by
Declaration
public double Increment { get; set; }
Property Value
Type | Description |
---|---|
System. |
Max
Gets or sets the maximum value allowable for a number value
Declaration
public double Max { get; set; }
Property Value
Type | Description |
---|---|
System. |
Min
Gets or sets the minimum value allowable for a number value
Declaration
public double Min { get; set; }
Property Value
Type | Description |
---|---|
System. |
OptionName
Gets the name of the option as it appears inside the emulator configuration
Declaration
public string OptionName { get; }
Property Value
Type | Description |
---|---|
System. |
PathType
If this option is a path, specifies the type of the path.
Declaration
public PathType PathType { get; }
Property Value
Type | Description |
---|---|
Path |
Private
Gets or sets a value indicating whether whether or not this option is private (not ever displayed to the user)
Declaration
public bool Private { get; set; }
Property Value
Type | Description |
---|---|
System. |
Simple
Gets or sets a value indicating whether whether or not this option is a simple option (displayed in "Simple" configuration mode)
Declaration
public bool Simple { get; set; }
Property Value
Type | Description |
---|---|
System. |
Unset
A serialization of the null string. If a string option type is set to null, then when serialized will be set to this unset.
Declaration
public string Unset { get; }
Property Value
Type | Description |
---|---|
System. |