Class AcceptableValueBase

Base type of all classes representing and enforcing acceptable values of config settings.

Inheritance
System.Object AcceptableValueBase AcceptableValueList<T> AcceptableValueRange<T>
Inherited Members
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 abstract class AcceptableValueBase

Constructors

AcceptableValueBase(Type)

Declaration
protected AcceptableValueBase(Type valueType)
Parameters
Type Name Description
System.Type valueType

Type of values that this class can Clamp.

Properties

ValueType

Type of the supported values.

Declaration
public Type ValueType { get; }
Property Value
Type Description
System.Type

Methods

Clamp(Object)

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

Declaration
public abstract object Clamp(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Object

IsValid(Object)

Check if the value is an acceptable value.

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

ToDescriptionString()

Get the string for use in config files.

Declaration
public abstract string ToDescriptionString()
Returns
Type Description
System.String