Browse Source

Added Settings<T> in file to Setting and suppressed warning

ArtemK123 4 years ago
parent
commit
c00e398946

+ 25 - 1
PixiEditor/Models/Tools/ToolSettings/Settings/Setting.cs

@@ -2,7 +2,31 @@
 using PixiEditor.Helpers;
 
 namespace PixiEditor.Models.Tools.ToolSettings.Settings
-{
+{
+    [System.Diagnostics.CodeAnalysis.SuppressMessage(
+        "StyleCop.CSharp.MaintainabilityRules",
+        "SA1402:File may only contain a single type",
+        Justification = "Same class with generic value")]
+    public abstract class Setting<T> : Setting
+    {
+        private T value;
+
+        protected Setting(string name)
+            : base(name)
+        {
+        }
+
+        public T Value
+        {
+            get => value;
+            set
+            {
+                this.value = value;
+                RaisePropertyChanged("Value");
+            }
+        }
+    }
+
     public abstract class Setting : NotifyableObject
     {
         protected Setting(string name)

+ 0 - 22
PixiEditor/Models/Tools/ToolSettings/Settings/Setting{T}.cs

@@ -1,22 +0,0 @@
-namespace PixiEditor.Models.Tools.ToolSettings.Settings
-{
-    public abstract class Setting<T> : Setting
-    {
-        private T value;
-
-        protected Setting(string name)
-            : base(name)
-        {
-        }
-
-        public T Value
-        {
-            get => value;
-            set
-            {
-                this.value = value;
-                RaisePropertyChanged("Value");
-            }
-        }
-    }
-}