ConfigLocations.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. /// <summary>
  4. /// Describes the location of the configuration files. The constants can be combined (bitwise) to specify multiple
  5. /// locations. The more significant the bit, the higher the priority meaning that the last location will override the
  6. /// earlier ones.
  7. /// </summary>
  8. [Flags]
  9. public enum ConfigLocations
  10. {
  11. /// <summary>No configuration will be loaded.</summary>
  12. /// <remarks>
  13. /// Used for development and testing only. For Terminal,Gui to function properly, at least
  14. /// <see cref="Default"/> should be set.
  15. /// </remarks>
  16. None = 0,
  17. /// <summary>
  18. /// Deafult configuration in <c>Terminal.Gui.dll</c>'s resources (<c>Terminal.Gui.Resources.config.json</c>).
  19. /// </summary>
  20. Default = 0b_0000_0001,
  21. /// <summary>
  22. /// App resources (e.g. <c>MyApp.Resources.config.json</c>).
  23. /// </summary>
  24. AppResources = 0b_0000_0010,
  25. /// <summary>
  26. /// Settings in the <see cref="ConfigurationManager.RuntimeConfig"/> static property.
  27. /// </summary>
  28. Runtime = 0b_0000_0100,
  29. /// <summary>
  30. /// Global settings in the current directory (e.g. <c>./.tui/config.json</c>).
  31. /// </summary>
  32. GlobalCurrent = 0b_0000_1000,
  33. /// <summary>
  34. /// Global settings in the home directory (e.g. <c>~/.tui/config.json</c>).
  35. /// </summary>
  36. GlobalHome = 0b_0001_0000,
  37. /// <summary>
  38. /// App settings in the current directory (e.g. <c>./.tui/MyApp.config.json</c>).
  39. /// </summary>
  40. AppCurrent = 0b_0010_0000,
  41. /// <summary>
  42. /// App settings in the home directory (e.g. <c>~/.tui/MyApp.config.json</c>).
  43. /// </summary>
  44. AppHome = 0b_0100_0000,
  45. /// <summary>This constant is a combination of all locations</summary>
  46. All = 0b_1111_1111
  47. }