From 835ab5107866776aa706c74d2fb8259bbab90896 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Thu, 27 Jun 2019 13:44:56 +1000 Subject: [PATCH] fix: uno not including ReactiveUI NuGet package --- src/ReactiveUI.Uno/ActivationForViewFetcher.cs | 2 +- src/ReactiveUI.Uno/PlatformRegistrations.cs | 6 ++++-- src/ReactiveUI.Uno/ReactiveUI.Uno.csproj | 17 ++++------------- src/ReactiveUI.Uno/WinRTAppDataDriver.cs | 2 +- .../DependencyObjectObservableForProperty.cs | 4 ++++ .../uap/TransitioningContentControl.Empty.cs | 4 ++++ .../AutoDataTemplateBindingHook.cs | 4 ++++ .../windows-common/BooleanToVisibilityHint.cs | 4 ++++ .../BooleanToVisibilityTypeConverter.cs | 4 ++++ .../windows-common/PlatformOperations.cs | 4 ++++ .../Platforms/windows-common/ReactivePage.cs | 18 +++++++++++------- .../windows-common/ReactiveUserControl.cs | 18 +++++++++++------- .../Platforms/windows-common/RoutedViewHost.cs | 4 ++++ .../windows-common/ViewModelViewHost.cs | 4 ++++ 14 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/ReactiveUI.Uno/ActivationForViewFetcher.cs b/src/ReactiveUI.Uno/ActivationForViewFetcher.cs index 2c0304a17f..7308e4ce75 100644 --- a/src/ReactiveUI.Uno/ActivationForViewFetcher.cs +++ b/src/ReactiveUI.Uno/ActivationForViewFetcher.cs @@ -12,7 +12,7 @@ using Windows.Foundation; using Windows.UI.Xaml; -namespace ReactiveUI +namespace ReactiveUI.Uno { /// /// ActiveationForViewFetcher is how ReactiveUI determine when a diff --git a/src/ReactiveUI.Uno/PlatformRegistrations.cs b/src/ReactiveUI.Uno/PlatformRegistrations.cs index 3da21b3400..1cce38d661 100644 --- a/src/ReactiveUI.Uno/PlatformRegistrations.cs +++ b/src/ReactiveUI.Uno/PlatformRegistrations.cs @@ -7,7 +7,7 @@ using System.Reactive.Concurrency; using System.Reactive.PlatformServices; -namespace ReactiveUI +namespace ReactiveUI.Uno { /// /// UWP platform registrations. @@ -23,7 +23,9 @@ public void Register(Action, Type> registerFunction) registerFunction(() => new DependencyObjectObservableForProperty(), typeof(ICreatesObservableForProperty)); registerFunction(() => new BooleanToVisibilityTypeConverter(), typeof(IBindingTypeConverter)); registerFunction(() => new AutoDataTemplateBindingHook(), typeof(IPropertyBindingHook)); - registerFunction(() => new WinRTAppDataDriver(), typeof(ISuspensionDriver)); + + // Re-enable once the obsolete code in Uno has been worked out. + ////registerFunction(() => new WinRTAppDataDriver(), typeof(ISuspensionDriver)); #if NETSTANDARD if (WasmPlatformEnlightenmentProvider.IsWasm) diff --git a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj index df310a8c91..8cac9bc3fa 100644 --- a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj +++ b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj @@ -12,22 +12,10 @@ - - - - + - - - - - - - - - @@ -40,4 +28,7 @@ + + + diff --git a/src/ReactiveUI.Uno/WinRTAppDataDriver.cs b/src/ReactiveUI.Uno/WinRTAppDataDriver.cs index 0c36002ff0..2ca238b409 100644 --- a/src/ReactiveUI.Uno/WinRTAppDataDriver.cs +++ b/src/ReactiveUI.Uno/WinRTAppDataDriver.cs @@ -18,7 +18,7 @@ using Windows.Storage; using UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding; -namespace ReactiveUI +namespace ReactiveUI.Uno { /// /// Loads and saves state to persistent storage. diff --git a/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs b/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs index 92b1e8513f..bdaf2f7631 100644 --- a/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs +++ b/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs @@ -13,7 +13,11 @@ using Splat; using Windows.UI.Xaml; +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// Creates a observable for a property if available that is based on a DependencyProperty. diff --git a/src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs b/src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs index 0771c0478f..0d35186d41 100644 --- a/src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs +++ b/src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs @@ -6,7 +6,11 @@ using System.Diagnostics.CodeAnalysis; using Windows.UI.Xaml.Controls; +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// A control with a single transition. diff --git a/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs b/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs index 66488417ee..5d0ab431e0 100644 --- a/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs +++ b/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs @@ -16,7 +16,11 @@ using System.Windows.Markup; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// AutoDataTemplateBindingHook is a binding hook that checks ItemsControls diff --git a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs b/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs index 630789ba90..3d55eb2886 100644 --- a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs +++ b/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs @@ -11,7 +11,11 @@ using System.Windows; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// Enum that hints at the visibility of a ui element. diff --git a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs b/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs index 9836336249..c24efa8775 100644 --- a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs +++ b/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs @@ -10,7 +10,11 @@ using System.Windows; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// This type convert converts between Boolean and XAML Visibility - the diff --git a/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs b/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs index 85146be577..efe6305f8e 100644 --- a/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs +++ b/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs @@ -9,7 +9,11 @@ using System.Text; using System.Threading.Tasks; +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// Returns the current orientation of the device on Windows. diff --git a/src/ReactiveUI/Platforms/windows-common/ReactivePage.cs b/src/ReactiveUI/Platforms/windows-common/ReactivePage.cs index 7a69a74ea9..ccc840c3fa 100644 --- a/src/ReactiveUI/Platforms/windows-common/ReactivePage.cs +++ b/src/ReactiveUI/Platforms/windows-common/ReactivePage.cs @@ -3,17 +3,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -namespace ReactiveUI -{ - using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; #if NETFX_CORE || HAS_UNO - using Windows.UI.Xaml; - using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; #else - using System.Windows; - using System.Windows.Controls; +using System.Windows; +using System.Windows.Controls; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else +namespace ReactiveUI +#endif +{ /// /// A that is reactive. /// diff --git a/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs b/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs index 5514a7fdba..24bfdb12a6 100755 --- a/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs +++ b/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs @@ -3,17 +3,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -namespace ReactiveUI -{ - using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; #if NETFX_CORE || HAS_UNO - using Windows.UI.Xaml; - using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; #else - using System.Windows; - using System.Windows.Controls; +using System.Windows; +using System.Windows.Controls; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else +namespace ReactiveUI +#endif +{ /// /// A that is reactive. /// diff --git a/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs b/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs index e32fe5b870..9bda853982 100644 --- a/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs +++ b/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs @@ -19,7 +19,11 @@ using System.Windows.Controls; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// This control hosts the View associated with a Router, and will display diff --git a/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs b/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs index cf1845a752..050ce5c3f9 100644 --- a/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs +++ b/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs @@ -19,7 +19,11 @@ using System.Windows.Controls; #endif +#if HAS_UNO +namespace ReactiveUI.Uno +#else namespace ReactiveUI +#endif { /// /// This content control will automatically load the View associated with