Class AcceptableValueRange<T>

Specify the range of acceptable values for a setting.

Inheritance
System.Object AcceptableValueBase AcceptableValueRange<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 AcceptableValueRange<T> : AcceptableValueBase where T : IComparable
Type Parameters
Name Description
T

Constructors

AcceptableValueRange(T, T)

Declaration
public AcceptableValueRange(T minValue, T maxValue)
Parameters
Type Name Description
T minValue

Lowest acceptable value

T maxValue

Highest acceptable value

Properties

MaxValue

Highest acceptable value

Declaration
public virtual T MaxValue { get; }
Property Value
Type Description
T

MinValue

Lowest acceptable value

Declaration
public virtual T MinValue { 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()