Kaynağa Gözat

Added extension method for user configuration

Kenric Nugteren 1 yıl önce
ebeveyn
işleme
3a68fb6963

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

@@ -10,6 +10,15 @@ namespace InABox.Configuration
     {
     }
 
+    public static class UserConfigurationExtensions
+    {
+        public static void SaveUser<T>(this T settings)
+            where T : IUserConfigurationSettings, new()
+        {
+            new UserConfiguration<T>().Save(settings);
+        }
+    }
+
     [UserTracking(false)]
     public class UserSettings : Entity, IPersistent, IRemotable, ILicense<CoreLicense>
     {