Преглед изворни кода

Split the constructor for backwards compatibility

ManlyMarco пре 5 година
родитељ
комит
1c66732b41
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      BepInEx/Configuration/ConfigFile.cs

+ 4 - 1
BepInEx/Configuration/ConfigFile.cs

@@ -57,13 +57,16 @@ namespace BepInEx.Configuration
 		/// </summary>
 		public bool SaveOnConfigSet { get; set; } = true;
 
+		/// <inheritdoc cref="ConfigFile(string, bool, BepInPlugin)"/>
+		public ConfigFile(string configPath, bool saveOnInit) : this(configPath, saveOnInit, null) { }
+
 		/// <summary>
 		/// Create a new config file at the specified config path.
 		/// </summary>
 		/// <param name="configPath">Full path to a file that contains settings. The file will be created as needed.</param>
 		/// <param name="saveOnInit">If the config file/directory doesn't exist, create it immediately.</param>
 		/// <param name="ownerMetadata">Information about the plugin that owns this setting file.</param>
-		public ConfigFile(string configPath, bool saveOnInit, BepInPlugin ownerMetadata = null)
+		public ConfigFile(string configPath, bool saveOnInit, BepInPlugin ownerMetadata)
 		{
 			_ownerMetadata = ownerMetadata;