Class AcceptableValueList<T>
Specify the list of acceptable values for a setting.
Namespace: BepInEx.Configuration
Assembly: BepInEx.Core.dll
Syntax
public class AcceptableValueList<T> : AcceptableValueBase where T : IEquatable<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
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
List of values that a setting can take.
Declaration
public virtual T[] AcceptableValues { get; }
Property Value
Type | Description |
---|---|
T[] |
Methods
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
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
Get the string for use in config files.
Declaration
public override string ToDescriptionString()
Returns
Type | Description |
---|---|
System.String |