Bläddra i källkod

Disable warnings when implementing deprecated API members.

Steven Kirk 5 år sedan
förälder
incheckning
be316e9aaf

+ 2 - 0
src/Avalonia.Controls/Window.cs

@@ -675,7 +675,9 @@ namespace Avalonia.Controls
 
                 if (o != n)
                 {
+#pragma warning disable CS0618 // Type or member is obsolete
                     RaisePropertyChanged(HasSystemDecorationsProperty, o, n);
+#pragma warning restore CS0618 // Type or member is obsolete
                 }
             }
         }

+ 3 - 1
src/Avalonia.Input/DragEventArgs.cs

@@ -52,8 +52,10 @@ namespace Avalonia.Input
             Data = data;
             _target = target;
             _targetLocation = targetLocation;
-            Modifiers = (InputModifiers)keyModifiers;
             KeyModifiers = keyModifiers;
+#pragma warning disable CS0618 // Type or member is obsolete
+            Modifiers = (InputModifiers)keyModifiers;
+#pragma warning restore CS0618 // Type or member is obsolete
         }
 
     }

+ 3 - 1
src/Avalonia.Input/Raw/RawDragEvent.cs

@@ -20,8 +20,10 @@ namespace Avalonia.Input.Raw
             Location = location;
             Data = data;
             Effects = effects;
-            Modifiers = (InputModifiers)modifiers;
             KeyModifiers = KeyModifiersUtils.ConvertToKey(modifiers);
+#pragma warning disable CS0618 // Type or member is obsolete
+            Modifiers = (InputModifiers)modifiers;
+#pragma warning restore CS0618 // Type or member is obsolete
         }
     }
 }