Class AcceptableValueRange<T>
Specify the range of acceptable values for a setting.
Namespace: BepInEx.Configuration
Assembly: BepInEx.Core.dll
Syntax
public class AcceptableValueRange<T> : AcceptableValueBase where T : IComparable
Type Parameters
| Name | Description |
|---|---|
T |
Constructors
Declaration
public AcceptableValueRange(T minValue, T maxValue)
Parameters
| Type | Name | Description |
|---|---|---|
T |
minValue |
Lowest acceptable value |
T |
maxValue |
Highest acceptable value |
Properties
Highest acceptable value
Declaration
public virtual T MaxValue { get; }
Property Value
| Type | Description |
|---|---|
T |
Lowest acceptable value
Declaration
public virtual T MinValue { 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 |