From c6b8c8c7c31a9fd6b97cff190456cd9744f88866 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 3 Sep 2024 05:15:23 +0300 Subject: [PATCH] chore: More cleanup --- src/Uno.UI/UI/Xaml/DependencyObjectStore.cs | 16 ++++++++-------- .../DependencyPropertyChangedEventArgs.cs | 19 ++++--------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/Uno.UI/UI/Xaml/DependencyObjectStore.cs b/src/Uno.UI/UI/Xaml/DependencyObjectStore.cs index 018c2e2db3..9d16e59a5e 100644 --- a/src/Uno.UI/UI/Xaml/DependencyObjectStore.cs +++ b/src/Uno.UI/UI/Xaml/DependencyObjectStore.cs @@ -1936,8 +1936,8 @@ namespace Microsoft.UI.Xaml if (propertyMetadata.HasPropertyChanged) { eventArgs ??= new DependencyPropertyChangedEventArgs(property, previousValue, newValue -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - , previousPrecedence, newPrecedence +#if IS_UNIT_TESTS + , newPrecedence #endif ); propertyMetadata.RaisePropertyChangedNoNullCheck(actualInstanceAlias, eventArgs); @@ -1952,8 +1952,8 @@ namespace Microsoft.UI.Xaml if (actualInstanceAlias is IDependencyObjectInternal doInternal) { eventArgs ??= new DependencyPropertyChangedEventArgs(property, previousValue, newValue -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - , previousPrecedence, newPrecedence +#if IS_UNIT_TESTS + , newPrecedence #endif ); doInternal.OnPropertyChanged2(eventArgs); @@ -1963,8 +1963,8 @@ namespace Microsoft.UI.Xaml if (propertyDetails.CanRaisePropertyChanged) { eventArgs ??= new DependencyPropertyChangedEventArgs(property, previousValue, newValue -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - , previousPrecedence, newPrecedence +#if IS_UNIT_TESTS + , newPrecedence #endif ); propertyDetails.RaisePropertyChangedNoNullCheck(actualInstanceAlias, eventArgs); @@ -1976,8 +1976,8 @@ namespace Microsoft.UI.Xaml { var callback = currentCallbacks[callbackIndex]; eventArgs ??= new DependencyPropertyChangedEventArgs(property, previousValue, newValue -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - , previousPrecedence, newPrecedence +#if IS_UNIT_TESTS + , newPrecedence #endif ); callback.Invoke(instanceRef, property, eventArgs); diff --git a/src/Uno.UI/UI/Xaml/DependencyPropertyChangedEventArgs.cs b/src/Uno.UI/UI/Xaml/DependencyPropertyChangedEventArgs.cs index d3580f6388..c1a80b9e1e 100644 --- a/src/Uno.UI/UI/Xaml/DependencyPropertyChangedEventArgs.cs +++ b/src/Uno.UI/UI/Xaml/DependencyPropertyChangedEventArgs.cs @@ -28,17 +28,15 @@ namespace Microsoft.UI.Xaml DependencyProperty property, object oldValue, object newValue -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - , DependencyPropertyValuePrecedences oldPrecedence, - DependencyPropertyValuePrecedences newPrecedence +#if IS_UNIT_TESTS + , DependencyPropertyValuePrecedences newPrecedence #endif ) { Property = property; OldValue = oldValue; NewValue = newValue; -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS - OldPrecedence = oldPrecedence; +#if IS_UNIT_TESTS NewPrecedence = newPrecedence; #endif } @@ -55,7 +53,7 @@ namespace Microsoft.UI.Xaml public DependencyProperty Property { get; } -#if __IOS__ || __MACOS__ || IS_UNIT_TESTS +#if IS_UNIT_TESTS /// /// Gets the dependency property value precedence of the new value /// @@ -64,15 +62,6 @@ namespace Microsoft.UI.Xaml get; private set; } - - /// - /// Gets the dependency property value precedence of the old value - /// - internal DependencyPropertyValuePrecedences OldPrecedence - { - get; - private set; - } #endif } }