]> O.S.I.I.S - jp/crow.git/commitdiff
add AppConfigPath public static property to Configuration class
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 9 Sep 2021 17:17:49 +0000 (17:17 +0000)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 9 Sep 2021 17:17:49 +0000 (17:17 +0000)
Crow/src/Configuration.cs

index 55bbeefb302ca1b0fa36b1266d940bb51f5d2275..5b99761d3f41baa0b0f0bff87048a8ba0c1cb8a2 100644 (file)
@@ -91,7 +91,10 @@ namespace Crow
                /// <param name="defaultConf"></param>
                public Configuration (Stream defaultConf = null) {                      
                        load (defaultConf);
-               }               
+               }
+               public static string AppConfigPath => Path.Combine (
+                       Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile), ".config") ,
+                       Assembly.GetEntryAssembly ().GetName().Name);
 
                static Configuration ()
                {