From 47368017a7f64aa2a290776ecde08b6bab212dfa Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 18 Dec 2019 22:56:05 +0100 Subject: [PATCH] Remove unused methods. --- src/Avalonia.Base/AvaloniaObject.cs | 45 ----------------------------- 1 file changed, 45 deletions(-) diff --git a/src/Avalonia.Base/AvaloniaObject.cs b/src/Avalonia.Base/AvaloniaObject.cs index f52638d948..160e6a3ca9 100644 --- a/src/Avalonia.Base/AvaloniaObject.cs +++ b/src/Avalonia.Base/AvaloniaObject.cs @@ -230,24 +230,6 @@ namespace Avalonia return property.RouteGetValue(this); } - /// - /// Gets a value. - /// - /// The type of the property. - /// The property. - /// The value. - public T GetValue(AvaloniaProperty property) - { - property = property ?? throw new ArgumentNullException(nameof(property)); - - return property switch - { - StyledPropertyBase styled => GetValue(styled), - DirectPropertyBase direct => GetValue(direct), - _ => throw new NotSupportedException("Unsupported AvaloniaProperty type.") - }; - } - /// /// Gets a value. /// @@ -323,33 +305,6 @@ namespace Avalonia property.RouteSetValue(this, value, priority); } - /// - /// Sets a value. - /// - /// The type of the property. - /// The property. - /// The value. - /// The priority of the value. - public void SetValue( - AvaloniaProperty property, - T value, - BindingPriority priority = BindingPriority.LocalValue) - { - property = property ?? throw new ArgumentNullException(nameof(property)); - - switch (property) - { - case StyledPropertyBase styled: - SetValue(styled, value, priority); - break; - case DirectPropertyBase direct: - SetValue(direct, value); - break; - default: - throw new NotSupportedException("Unsupported AvaloniaProperty type."); - } - } - /// /// Sets a value. ///