Class SettingKey
- Namespace
- CarinaStudio.Configuration
- Assembly
- CarinaStudio.AppBase.Configuration.dll
Key of setting.
public class SettingKey
- Inheritance
-
SettingKey
- Derived
- Inherited Members
- Extension Methods
Constructors
SettingKey(string, Type, object)
Initialize new SettingKey instance.
public SettingKey(string name, Type valueType, object defaultValue)
Parameters
namestringName of key.
valueTypeTypeType of value of setting.
defaultValueobjectDefault value.
Properties
DefaultValue
Default value.
public object DefaultValue { get; }
Property Value
Name
Name of key.
public string Name { get; }
Property Value
ValueType
Type of value of setting.
public Type ValueType { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetDefinedKeys<T>()
Get all public SettingKey defined by given type.
public static IList<SettingKey> GetDefinedKeys<T>()
Returns
- IList<SettingKey>
List of public SettingKey.
Type Parameters
T
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(SettingKey, SettingKey)
Equality operator.
public static bool operator ==(SettingKey x, SettingKey y)
Parameters
xSettingKeyOperand 1.
ySettingKeyOperand 2.
Returns
- bool
True if operands are equivalent.
operator !=(SettingKey, SettingKey)
Inequality operator.
public static bool operator !=(SettingKey x, SettingKey y)
Parameters
xSettingKeyOperand 1.
ySettingKeyOperand 2.
Returns
- bool
True if operands are not equivalent.