Class ConfigDefinition

Section and key of a setting. Used as a unique key for identification within a ConfigFile. The same definition can be used in multiple config files, it will point to different settings then.

Inheritance
System.Object ConfigDefinition
Implements
System.IEquatable<ConfigDefinition>
Inherited Members
System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx.Configuration
Assembly: BepInEx.dll
Syntax
public class ConfigDefinition : IEquatable<ConfigDefinition>

Constructors

ConfigDefinition(String, String)

Create a new definition. Definitions with same section and key are equal.

Declaration
public ConfigDefinition(string section, string key)
Parameters
Type Name Description
System.String section

Group of the setting, case sensitive.

System.String key

Name of the setting, case sensitive.

ConfigDefinition(String, String, String)

Declaration
[Obsolete("description argument is no longer used, put it in a ConfigDescription instead")]
public ConfigDefinition(string section, string key, string description)
Parameters
Type Name Description
System.String section
System.String key
System.String description

Properties

Key

Name of the setting.

Declaration
public string Key { get; }
Property Value
Type Description
System.String

Section

Group of the setting. All settings within a config file are grouped by this.

Declaration
public string Section { get; }
Property Value
Type Description
System.String

Methods

Equals(ConfigDefinition)

Check if the definitions are the same.

Declaration
public bool Equals(ConfigDefinition other)
Parameters
Type Name Description
ConfigDefinition other
Returns
Type Description
System.Boolean

Equals(Object)

Check if the definitions are the same.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Operators

Equality(ConfigDefinition, ConfigDefinition)

Check if the definitions are the same.

Declaration
public static bool operator ==(ConfigDefinition left, ConfigDefinition right)
Parameters
Type Name Description
ConfigDefinition left
ConfigDefinition right
Returns
Type Description
System.Boolean

Inequality(ConfigDefinition, ConfigDefinition)

Check if the definitions are the same.

Declaration
public static bool operator !=(ConfigDefinition left, ConfigDefinition right)
Parameters
Type Name Description
ConfigDefinition left
ConfigDefinition right
Returns
Type Description
System.Boolean

Implements

System.IEquatable<T>