Class AcceptableValueList<T>

Specify the list of acceptable values for a setting.

Inheritance
System.Object AcceptableValueBase AcceptableValueList<T>
Inherited Members
AcceptableValueBase.ValueType System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx.Configuration
Assembly: BepInEx.Core.dll
Syntax
public class AcceptableValueList<T> : AcceptableValueBase where T : IEquatable<T>
Type Parameters
Name Description
T

Constructors

AcceptableValueList(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.

Declaration
public AcceptableValueList(params T[] acceptableValues)
Parameters
Type Name Description
T[] acceptableValues

Properties

AcceptableValues

List of values that a setting can take.

Declaration
public virtual T[] AcceptableValues { get; }
Property Value
Type Description
T[]

Methods

Clamp(Object)

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

Declaration
public override object Clamp(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Object
Overrides
AcceptableValueBase.Clamp(Object)

IsValid(Object)

Check if the value is an acceptable value.

Declaration
public override bool IsValid(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Boolean
Overrides
AcceptableValueBase.IsValid(Object)

ToDescriptionString()

Get the string for use in config files.

Declaration
public override string ToDescriptionString()
Returns
Type Description
System.String
Overrides
AcceptableValueBase.ToDescriptionString()