forked from gui-cs/Terminal.Gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request gui-cs#3843 from tig/v2_3841-ConfigManager
Fixes gui-cs#3841 - `ConfigurationManager` not loading correctly
- Loading branch information
Showing
35 changed files
with
700 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#nullable enable | ||
namespace Terminal.Gui; | ||
|
||
/// <summary> | ||
/// Describes the location of the configuration files. The constants can be combined (bitwise) to specify multiple | ||
/// locations. The more significant the bit, the higher the priority meaning that the last location will override the | ||
/// earlier ones. | ||
/// </summary> | ||
|
||
[Flags] | ||
public enum ConfigLocations | ||
{ | ||
/// <summary>No configuration will be loaded.</summary> | ||
/// <remarks> | ||
/// Used for development and testing only. For Terminal,Gui to function properly, at least | ||
/// <see cref="Default"/> should be set. | ||
/// </remarks> | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Deafult configuration in <c>Terminal.Gui.dll</c>'s resources (<c>Terminal.Gui.Resources.config.json</c>). | ||
/// </summary> | ||
Default = 0b_0000_0001, | ||
|
||
/// <summary> | ||
/// Global settings in the current directory (e.g. <c>./.tui/config.json</c>). | ||
/// </summary> | ||
GlobalCurrent = 0b_0000_0010, | ||
|
||
/// <summary> | ||
/// Global settings in the home directory (e.g. <c>~/.tui/config.json</c>). | ||
/// </summary> | ||
GlobalHome = 0b_0000_0100, | ||
|
||
/// <summary> | ||
/// App resources (e.g. <c>MyApp.Resources.config.json</c>). | ||
/// </summary> | ||
AppResources = 0b_0000_1000, | ||
|
||
/// <summary> | ||
/// App settings in the current directory (e.g. <c>./.tui/MyApp.config.json</c>). | ||
/// </summary> | ||
AppCurrent = 0b_0001_0000, | ||
|
||
/// <summary> | ||
/// App settings in the home directory (e.g. <c>~/.tui/MyApp.config.json</c>). | ||
/// </summary> | ||
AppHome = 0b_0010_0000, | ||
|
||
/// <summary> | ||
/// Settings in the <see cref="ConfigurationManager.RuntimeConfig"/> static property. | ||
/// </summary> | ||
Runtime = 0b_0100_0000, | ||
|
||
/// <summary>This constant is a combination of all locations</summary> | ||
All = 0b_1111_1111 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.