AcceptableValueList<T> Class
Definition
Section titled “Definition”Specify the list of acceptable values for a setting.
public class AcceptableValueList<T> : AcceptableValueBase where T : IEquatable<T>
Type Parameters
Section titled “Type Parameters”T
Inheritance object → AcceptableValueBase
Constructors
Section titled “Constructors”AcceptableValueList(params T[])
Section titled “AcceptableValueList(params T[])”Specify the list of acceptable values for a setting. If the setting does not equal any of the values, it will be set to the first one.
public AcceptableValueList(params T[] acceptableValues)
Parameters
Section titled “Parameters”acceptableValues
T[]
Properties
Section titled “Properties”AcceptableValues
Section titled “AcceptableValues”List of values that a setting can take.
public virtual T[] AcceptableValues { get; }
Methods
Section titled “Methods”Clamp(object)
Section titled “Clamp(object)”Change the value to be acceptable, if it’s not already.
public override object Clamp(object value)
Parameters
Section titled “Parameters”value
object
Returns
Section titled “Returns”IsValid(object)
Section titled “IsValid(object)”Check if the value is an acceptable value.
public override bool IsValid(object value)
Parameters
Section titled “Parameters”value
object
Returns
Section titled “Returns”ToDescriptionString()
Section titled “ToDescriptionString()”Get the string for use in config files.
public override string ToDescriptionString()