Browse Source

Added static UserConfiguration

Kenric Nugteren 1 week ago
parent
commit
8ac6360c06
1 changed files with 14 additions and 0 deletions
  1. 14 0
      InABox.Core/Configuration/UserConfiguration.cs

+ 14 - 0
InABox.Core/Configuration/UserConfiguration.cs

@@ -18,6 +18,20 @@ namespace InABox.Configuration
         }
     }
 
+    public static class UserConfiguration
+    {
+        public static T Load<T>(bool useCache = true, string section = "")
+            where T : IUserConfigurationSettings, new()
+        {
+            return new UserConfiguration<T>(section).Load(useCache: useCache);
+        }
+        public static void Save<T>(T obj, string section = "")
+            where T : IUserConfigurationSettings, new()
+        {
+            new UserConfiguration<T>(section).Save(obj);
+        }
+    }
+
     [UserTracking(false)]
     [Unrecoverable]
     public class UserSettings : Entity, IPersistent, IRemotable, ILicense<CoreLicense>