Browse Source

Added extension method for user configuration

Kenric Nugteren 1 năm trước cách đây
mục cha
commit
3a68fb6963
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      InABox.Core/Configuration/UserConfiguration.cs

+ 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>
     {