Skip to content

AcceptableValueList<T> Class

Specify the list of acceptable values for a setting.

C#
public class AcceptableValueList<T> : AcceptableValueBase where T : IEquatable<T>

T

Inheritance objectAcceptableValueBase

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.

C#
public AcceptableValueList(params T[] acceptableValues)

acceptableValues T[]

List of values that a setting can take.

C#
public virtual T[] AcceptableValues { get; }

Change the value to be acceptable, if it’s not already.

C#
public override object Clamp(object value)

value object

object

Check if the value is an acceptable value.

C#
public override bool IsValid(object value)

value object

bool

Get the string for use in config files.

C#
public override string ToDescriptionString()

string