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.
Namespace: BepInEx.Configuration
Assembly: BepInEx.Core.dll
Syntax
public class ConfigDefinition : IEquatable<ConfigDefinition>
Constructors
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. |
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
Name of the setting.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
System.String |
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
Check if the definitions are the same.
Declaration
public bool Equals(ConfigDefinition other)
Parameters
Type | Name | Description |
---|---|---|
ConfigDefinition |
other |
Returns
Type | Description |
---|---|
System.Boolean |
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)
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
Operators
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 |
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>