19 Commits
Author SHA1 Message Date
HetCreep fb5f191b36 Enumerate a config snapshot under the lock (#1357)
ConfigFile documents its public methods as thread-safe, but GetEnumerator
returned the live Dictionary enumerator with no lock, so a concurrent
Bind/Reload could invalidate it mid-foreach. Snapshot under _ioLock instead.
2026-06-21 12:13:51 +02:00
HetCreep 32fb12f2e9 Remove the duplicate byte TomlTypeConverter registration (#1359)
typeof(byte) was registered twice in the TypeConverters initializer; the
second entry silently overwrote the first. Keep the one grouped with the
other integral types.
2026-06-21 12:10:28 +02:00
HetCreep da64b220eb Do not abort startup when the config file cannot be written (#1340)
* Don't abort startup when the config file can't be written

ConfigFile.Save opens the file for writing with no exception handling and is invoked automatically via SaveOnConfigSet while settings are bound during startup, before logging is initialized. A read-only or otherwise unwritable config file (a read-only install directory, a file locked by another process or antivirus) therefore throws UnauthorizedAccessException out of the early startup path and shows the Failed to start BepInEx dialog.
2026-06-11 14:49:59 +02:00
ghorsington e473f08e0a ConfigFile: Fix visibility of Values
GetConfigEntries was obsoleted, but Values was never set to public (only explicitly implemented)
2022-08-09 21:23:17 +03:00
Kirai Chan 810e556bb7 Add protected visibility of ConfigEntryBase ctor 2022-04-21 02:05:05 -04:00
ghorsington 4bb48c502e Reformat project; apply code style 2021-12-21 18:55:05 +02:00
ghorsington 81141fcfc4 Add LogInterpolatedStringHandler overload for default logger 2021-12-21 18:49:07 +02:00
ghorsington 325e0df14b Use C# 10, reformat project 2021-12-21 16:09:39 +02:00
ghorsington c874d4f6b3 Apply style 2021-04-11 14:10:00 +03:00
Ash 9d59aaae79 Remove BOM from log and config files 2021-04-07 17:15:33 -05:00
Marius Ungureanu f4f03b72bf Avoid LINQ call by using the expected type in the foreach loop
Preserves exception compatibility and behaves better, including
having improved codegen as a result.
2021-02-20 03:14:13 +02:00
ghorsington ff4e1b7c7f Reformat code after last commits 2021-01-26 20:47:02 +02:00
ghorsington ecb61f60d8 Apply code style 2021-01-23 22:04:11 +02:00
ManlyMarco 28950af313 Add ability to disable generating setting descriptions in ConfigFile 2021-01-09 04:24:34 +01:00
ghorsington 88e3dfb7e7 Update some code to use C#9 features 2021-01-05 22:54:45 +02:00
Bepis 8204577374 Limit line.Split in Reload()
Rebase of 0591e6b
2020-11-06 11:52:22 +11:00
Bepis 798d008f1d Document all undocumented code
Rebase of 78484b7
2020-11-06 11:27:39 +11:00
Bepis f51ad82619 Fix sharing violation on config file save in some rare cases
Rebase of 541ab9e218
2020-11-05 17:21:03 +11:00
Bepis dc5d9f444f Initial framework split 2020-04-27 20:07:10 +10:00