From 8c97778ad584e7f5f5f279c2e824834e84efd2ea Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 01:03:40 +0100 Subject: [PATCH 01/14] feature Add net6.0 support --- .github/workflows/ci-build.yml | 11 ++++++++++- README.md | 14 ++++++++++++++ src/Directory.build.props | 3 --- src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj | 8 ++++++-- src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj | 11 ++++++++--- src/ReactiveUI.Testing/ReactiveUI.Testing.csproj | 2 +- .../ReactiveUI.Winforms.csproj | 2 +- src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj | 7 ++----- src/ReactiveUI/ReactiveUI.csproj | 15 +++++++++------ 9 files changed, 51 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 75ca74afea..594c4b589c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,7 +38,16 @@ jobs: dotnet-version: 6.0.x include-prerelease: true - - name: Install VS2019 preview + - name: Install DotNet workloads + shell: bash + run: | + dotnet workload install android + dotnet workload install ios + dotnet workload install tvos + dotnet workload install macos + dotnet workload install maui + + - name: Install VS2022 preview shell: bash run: | dotnet tool update -g dotnet-vs diff --git a/README.md b/README.md index c886ba15b9..03ba771f5d 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,14 @@ ReactiveUI is developed under an OSI-approved open source license, making it fre If you want to submit pull requests please first open a [GitHub issue](https://github.com/reactiveui/ReactiveUI/issues/new/choose) to discuss. We are first time PR contributors friendly. +The current source uses **Visual Studio 2022 Preview**. Please install the following workloads to enable building the source: + +- dotnet workload install android +- dotnet workload install ios +- dotnet workload install tvos +- dotnet workload install macos +- dotnet workload install maui + ## Core Team @@ -150,6 +158,8 @@ If you want to submit pull requests please first open a [GitHub issue](https://g Artyom Gorchakov

Moscow, Russia

+ +

@@ -166,6 +176,7 @@ If you want to submit pull requests please first open a [GitHub issue](https://g
+ ## Alumni Core Team The following have been core team members in the past. @@ -191,6 +202,8 @@ The following have been core team members in the past. Olly Levett

London, United Kingdom

+ +
@@ -213,6 +226,7 @@ The following have been core team members in the past. + ## .NET Foundation ReactiveUI is part of the [.NET Foundation](https://www.dotnetfoundation.org/). Other projects that are associated with the foundation include the Microsoft .NET Compiler Platform ("Roslyn") as well as the Microsoft ASP.NET family of projects, Microsoft .NET Core & Xamarin Forms. diff --git a/src/Directory.build.props b/src/Directory.build.props index d408300b01..145e4f8eaa 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -60,11 +60,8 @@ - - - diff --git a/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj b/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj index 6dc8482966..d2c1e8dcb4 100644 --- a/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj +++ b/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0 + netstandard2.0;net5.0;net6.0 Contains the ReactiveUI platform specific extensions for Blazor mvvm;reactiveui;rx;reactive extensions;observable;LINQ;eventsnet;netstandard;blazor;web; enable @@ -16,9 +16,13 @@ - + + + + + diff --git a/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj b/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj index 0bd4c44b6c..bb29ac521a 100644 --- a/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj +++ b/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj @@ -1,6 +1,6 @@ - + - MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0 + MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos $(TargetFrameworks);net472;uap10.0.16299;netcoreapp3.1;net5.0-windows10.0.19041 ReactiveUI.Drawing ReactiveUI.Drawing @@ -9,12 +9,17 @@ enable preview + + + + + - + diff --git a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj index f981e7f382..cedbee257d 100644 --- a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj +++ b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0 + netstandard2.0;net5.0;net6.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0 $(TargetFrameworks);net472;uap10.0.16299;netcoreapp3.1 ReactiveUI.Testing ReactiveUI.Testing diff --git a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj index 3fc0e6911c..09481688d6 100644 --- a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj +++ b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;net5.0-windows;net461;net472;net48;net5.0-windows10.0.19041 + netcoreapp3.1;net5.0-windows;net6.0-windows;net461;net472;net48;net5.0-windows10.0.19041 ReactiveUI.Winforms ReactiveUI.Winforms Contains the ReactiveUI platform specific extensions for Windows Forms diff --git a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj index 411dc38ea0..f056d4094b 100644 --- a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj +++ b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1;net5.0-windows;net461;net472;net48;net5.0-windows10.0.19041 + netcoreapp3.1;net5.0-windows;net6.0-windows;net461;net472;net48;net5.0-windows10.0.19041 Contains the ReactiveUI platform specific extensions for Windows Presentation Foundation (WPF) ReactiveUI.WPF true @@ -14,11 +14,8 @@ - + - - - diff --git a/src/ReactiveUI/ReactiveUI.csproj b/src/ReactiveUI/ReactiveUI.csproj index 04f68985e9..6bf74c39d9 100644 --- a/src/ReactiveUI/ReactiveUI.csproj +++ b/src/ReactiveUI/ReactiveUI.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0;tizen40;net6.0 - $(TargetFrameworks);net461;net472;uap10.0.16299;netcoreapp3.1;net5.0-windows;net5.0-windows10.0.19041 + netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos + $(TargetFrameworks);net461;net472;uap10.0.16299;netcoreapp3.1;net5.0-windows;net6.0-windows;net5.0-windows10.0.19041 ReactiveUI ReactiveUI A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the base package with the base platform implementations @@ -10,19 +10,22 @@ preview - + true true - + $(DefineConstants);HAS_WPF + - + + + @@ -45,7 +48,7 @@ - + From ea7272cb627623af539bf6c27049cad0d178937c Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 01:38:22 +0100 Subject: [PATCH 02/14] Update build-samples.yml --- .github/workflows/build-samples.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml index 1cade4d97c..b2a631ff94 100644 --- a/.github/workflows/build-samples.yml +++ b/.github/workflows/build-samples.yml @@ -37,7 +37,16 @@ jobs: dotnet-version: 6.0.x include-prerelease: true - - name: Install VS2019 preview + - name: Install DotNet workloads + shell: bash + run: | + dotnet workload install android + dotnet workload install ios + dotnet workload install tvos + dotnet workload install macos + dotnet workload install maui + + - name: Install VS2022 preview shell: bash run: | dotnet tool update -g dotnet-vs From 5cc643d2dc731ea79c4610d79a2cdfb0cc86e4b0 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 02:41:05 +0100 Subject: [PATCH 03/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03ba771f5d..23dd650f30 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ ReactiveUI is developed under an OSI-approved open source license, making it fre If you want to submit pull requests please first open a [GitHub issue](https://github.com/reactiveui/ReactiveUI/issues/new/choose) to discuss. We are first time PR contributors friendly. -The current source uses **Visual Studio 2022 Preview**. Please install the following workloads to enable building the source: +The current source uses **Visual Studio 2019 Preview**. Please install the following workloads to enable building the source: - dotnet workload install android - dotnet workload install ios From 2c7d945cd0bb29f71178e8253c13ca7a90dc0e7b Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 02:55:02 +0100 Subject: [PATCH 04/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 594c4b589c..eb10ca88c9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -75,8 +75,8 @@ jobs: run: | dotnet tool install -g Pharmacist pharmacist generate-platform -t uap10.0.16299,uap10.0.17134,uap10.0.17763,uap10.0.18362,uap10.0.19041,xamarin.mac20,xamarin.tvos10,monoandroid10.0,monoandroid11.0,xamarin.ios10,xamarin.watchos10 -o "src/ReactiveUI.Events/" --output-prefix "Events_" - pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0 --is-wpf -o "src/ReactiveUI.Events.WPF/" --output-prefix "Events_" - pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0 --is-winforms -o "src/ReactiveUI.Events.Winforms/" --output-prefix "Events_" + pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-wpf -o "src/ReactiveUI.Events.WPF/" --output-prefix "Events_" + pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-winforms -o "src/ReactiveUI.Events.Winforms/" --output-prefix "Events_" - name: Build run: | From 0fe008426591f60ec34c6c573f069a5f428c5318 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 20 Aug 2021 15:59:53 +1000 Subject: [PATCH 05/14] Work on platform stuff --- src/Directory.build.targets | 31 ++++-- ...provalTests.ReactiveUI.net472.approved.txt | 2 + ...provalTests.ReactiveUI.net5.0.approved.txt | 4 +- ...ests.ReactiveUI.netcoreapp3.1.approved.txt | 2 + src/ReactiveUI.Uno/ReactiveUI.Uno.csproj | 18 ++-- .../ActivationForViewFetcher.cs | 0 .../AutoSuspendHelper.cs | 0 .../Common}/AutoDataTemplateBindingHook.cs | 0 .../Common}/BooleanToVisibilityHint.cs | 0 .../BooleanToVisibilityTypeConverter.cs | 0 .../Common}/PlatformOperations.cs | 0 .../Common}/ReactivePage.cs | 0 .../Common}/ReactiveUserControl.cs | 0 .../Common}/RoutedViewHost.cs | 0 .../Common}/ViewModelViewHost.cs | 0 .../DependencyObjectObservableForProperty.cs | 18 +++- .../PlatformRegistrations.cs | 0 src/ReactiveUI.Uwp/ReactiveUI.Uwp.csproj | 23 +++++ .../uap => ReactiveUI.Uwp}/ReactiveUI.rd.xml | 0 src/ReactiveUI.Uwp/Registrations.cs | 36 +++++++ .../Rx}/Concurrency/ControlScheduler.cs | 0 .../Rx}/Concurrency/DispatcherScheduler.cs | 2 - .../Rx}/Internal/Constants.cs | 2 - .../Rx}/Linq/ControlObservable.cs | 0 .../Rx}/Linq/DispatcherObservable.cs | 2 - .../Rx}/Linq/Observable.Remoting.cs | 0 .../Rx}/Linq/QueryLanguage.Remoting.cs | 0 .../SingleWindowDispatcherScheduler.cs | 0 .../TransitioningContentControl.Empty.cs | 0 .../WinRTAppDataDriver.cs | 0 .../ReactiveUI.Winforms.csproj | 10 ++ src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj | 12 ++- src/ReactiveUI.sln | 13 ++- .../Mixins/DependencyResolverMixins.cs | 3 +- .../android/AndroidCommandBinders.cs | 2 +- .../android/AndroidObservableForWidgets.cs | 6 +- .../android/BundleSuspensionDriver.cs | 9 +- .../Platforms/android/ControlFetcherMixin.cs | 11 ++- .../android/FlexibleCommandBinder.cs | 2 +- .../apple-common/TargetActionCommandBinder.cs | 2 +- .../Platforms/ios/LinkerOverrides.cs | 2 +- .../Platforms/ios/UIKitCommandBinders.cs | 6 +- .../ComponentModelTypeConverter.cs | 0 .../{net4 => net}/PlatformRegistrations.cs | 0 .../net5/ComponentModelTypeConverter.cs | 95 ------------------- .../Platforms/net5/PlatformRegistrations.cs | 34 ------- .../net6/ComponentModelTypeConverter.cs | 95 ------------------- .../Platforms/net6/PlatformRegistrations.cs | 34 ------- .../Platforms/tvos/LinkerOverrides.cs | 2 +- .../Platforms/tvos/UIKitCommandBinders.cs | 4 +- .../uikit-common/CommonReactiveSource.cs | 2 +- .../uikit-common/FlexibleCommandBinder.cs | 4 +- .../ReactiveCollectionViewSource.cs | 6 +- .../uikit-common/ReactiveTableViewSource.cs | 6 +- src/ReactiveUI/Properties/AssemblyInfo.cs | 1 + src/ReactiveUI/ReactiveUI.csproj | 83 +++++++--------- src/ReactiveUI/RegistrationNamespace.cs | 7 +- 57 files changed, 230 insertions(+), 361 deletions(-) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/ActivationForViewFetcher.cs (100%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/AutoSuspendHelper.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/AutoDataTemplateBindingHook.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/BooleanToVisibilityHint.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/BooleanToVisibilityTypeConverter.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/PlatformOperations.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/ReactivePage.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/ReactiveUserControl.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/RoutedViewHost.cs (100%) rename src/{ReactiveUI/Platforms/windows-common => ReactiveUI.Uwp/Common}/ViewModelViewHost.cs (100%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/DependencyObjectObservableForProperty.cs (92%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/PlatformRegistrations.cs (100%) create mode 100644 src/ReactiveUI.Uwp/ReactiveUI.Uwp.csproj rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/ReactiveUI.rd.xml (100%) create mode 100644 src/ReactiveUI.Uwp/Registrations.cs rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Concurrency/ControlScheduler.cs (100%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Concurrency/DispatcherScheduler.cs (99%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Internal/Constants.cs (97%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Linq/ControlObservable.cs (100%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Linq/DispatcherObservable.cs (99%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Linq/Observable.Remoting.cs (100%) rename src/{ReactiveUI/Platforms/net4Desktop => ReactiveUI.Uwp/Rx}/Linq/QueryLanguage.Remoting.cs (100%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/SingleWindowDispatcherScheduler.cs (100%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/TransitioningContentControl.Empty.cs (100%) rename src/{ReactiveUI/Platforms/uap => ReactiveUI.Uwp}/WinRTAppDataDriver.cs (100%) rename src/ReactiveUI/Platforms/{net4 => net}/ComponentModelTypeConverter.cs (100%) rename src/ReactiveUI/Platforms/{net4 => net}/PlatformRegistrations.cs (100%) delete mode 100644 src/ReactiveUI/Platforms/net5/ComponentModelTypeConverter.cs delete mode 100644 src/ReactiveUI/Platforms/net5/PlatformRegistrations.cs delete mode 100644 src/ReactiveUI/Platforms/net6/ComponentModelTypeConverter.cs delete mode 100644 src/ReactiveUI/Platforms/net6/PlatformRegistrations.cs diff --git a/src/Directory.build.targets b/src/Directory.build.targets index 9e505e6186..7d167fc11f 100644 --- a/src/Directory.build.targets +++ b/src/Directory.build.targets @@ -10,30 +10,49 @@ $(DefineConstants);NETSTANDARD;PORTABLE + + $(DefineConstants);NETCOREAPP + + + $(DefineConstants);NETCOREAPP2 + + + $(DefineConstants);NETCOREAPP3 + $(DefineConstants);NET_461;XAML - $(DefineConstants);NETFX_CORE;XAML;WINDOWS;WINDOWS_UWP + 10.0.16299.0 + $(DefineConstants);NETFX_CORE;XAML;WINDOWS_UWP $(DefineConstants);MONO;UIKIT;COCOA;IOS - + + $(DefineConstants);MONO;UIKIT;COCOA;IOS + + $(DefineConstants);MONO;COCOA;MAC - + + $(DefineConstants);MONO;COCOA;MAC + + + $(DefineConstants);MONO;UIKIT;COCOA;TVOS + + $(DefineConstants);MONO;UIKIT;COCOA;TVOS - $(DefineConstants);MONO;COCOA;WATCHOS + $(DefineConstants);MONO;UIKIT;COCOA;WATCHOS $(DefineConstants);MONO;ANDROID false - - $(DefineConstants);NETCOREAPP + + $(DefineConstants);MONO;ANDROID $(DefineConstants);TIZEN diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt index b6f5297e44..62b3e5cc76 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt @@ -7,6 +7,7 @@ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.TestRunner.Android")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Tests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uno")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uwp")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Winforms")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Wpf")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.XamForms")] @@ -723,6 +724,7 @@ namespace ReactiveUI Drawing = 6, Avalonia = 7, Maui = 8, + Uwp = 9, } public class Registrations { diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt index 9be41a1d91..250168abc7 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt @@ -7,12 +7,11 @@ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.TestRunner.Android")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Tests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uno")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uwp")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Winforms")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Wpf")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.XamForms")] -[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.19041.0")] [assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v5.0", FrameworkDisplayName="")] -[assembly: System.Runtime.Versioning.TargetPlatform("Windows10.0.19041.0")] namespace ReactiveUI { public static class AutoPersistHelper @@ -718,6 +717,7 @@ namespace ReactiveUI Drawing = 6, Avalonia = 7, Maui = 8, + Uwp = 9, } public class Registrations { diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt index d39fee0569..394cb96f10 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt @@ -7,6 +7,7 @@ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.TestRunner.Android")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Tests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uno")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Uwp")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Winforms")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.Wpf")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ReactiveUI.XamForms")] @@ -716,6 +717,7 @@ namespace ReactiveUI Drawing = 6, Avalonia = 7, Maui = 8, + Uwp = 9, } public class Registrations { diff --git a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj index 55d6966df2..8353f660df 100644 --- a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj +++ b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj @@ -1,6 +1,6 @@ - + - netstandard20;MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20 + netstandard20;MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;net6.0-android;net6.0-ios;net6.0-macos $(TargetFrameworks);uap10.0.16299 ReactiveUI.Uno Contains the ReactiveUI platform specific extensions for Uno @@ -15,6 +15,12 @@ HAS_UNO;WASM + + + + + + @@ -29,11 +35,11 @@ - - - + + + - + diff --git a/src/ReactiveUI/Platforms/uap/ActivationForViewFetcher.cs b/src/ReactiveUI.Uwp/ActivationForViewFetcher.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/ActivationForViewFetcher.cs rename to src/ReactiveUI.Uwp/ActivationForViewFetcher.cs diff --git a/src/ReactiveUI/Platforms/uap/AutoSuspendHelper.cs b/src/ReactiveUI.Uwp/AutoSuspendHelper.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/AutoSuspendHelper.cs rename to src/ReactiveUI.Uwp/AutoSuspendHelper.cs diff --git a/src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs b/src/ReactiveUI.Uwp/Common/AutoDataTemplateBindingHook.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs rename to src/ReactiveUI.Uwp/Common/AutoDataTemplateBindingHook.cs diff --git a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs b/src/ReactiveUI.Uwp/Common/BooleanToVisibilityHint.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs rename to src/ReactiveUI.Uwp/Common/BooleanToVisibilityHint.cs diff --git a/src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs b/src/ReactiveUI.Uwp/Common/BooleanToVisibilityTypeConverter.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs rename to src/ReactiveUI.Uwp/Common/BooleanToVisibilityTypeConverter.cs diff --git a/src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs b/src/ReactiveUI.Uwp/Common/PlatformOperations.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs rename to src/ReactiveUI.Uwp/Common/PlatformOperations.cs diff --git a/src/ReactiveUI/Platforms/windows-common/ReactivePage.cs b/src/ReactiveUI.Uwp/Common/ReactivePage.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/ReactivePage.cs rename to src/ReactiveUI.Uwp/Common/ReactivePage.cs diff --git a/src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs b/src/ReactiveUI.Uwp/Common/ReactiveUserControl.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs rename to src/ReactiveUI.Uwp/Common/ReactiveUserControl.cs diff --git a/src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs b/src/ReactiveUI.Uwp/Common/RoutedViewHost.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs rename to src/ReactiveUI.Uwp/Common/RoutedViewHost.cs diff --git a/src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs b/src/ReactiveUI.Uwp/Common/ViewModelViewHost.cs similarity index 100% rename from src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs rename to src/ReactiveUI.Uwp/Common/ViewModelViewHost.cs diff --git a/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs b/src/ReactiveUI.Uwp/DependencyObjectObservableForProperty.cs similarity index 92% rename from src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs rename to src/ReactiveUI.Uwp/DependencyObjectObservableForProperty.cs index 79ecd6640f..89dafac2e4 100644 --- a/src/ReactiveUI/Platforms/uap/DependencyObjectObservableForProperty.cs +++ b/src/ReactiveUI.Uwp/DependencyObjectObservableForProperty.cs @@ -132,13 +132,27 @@ public int GetAffinityForObject(Type type, string propertyName, bool beforeChang var pi = ActuallyGetProperty(typeInfo, propertyName + "Property"); if (pi != null) { - return () => (DependencyProperty)pi.GetValue(null); + var value = pi.GetValue(null); + + if (value is null) + { + return null; + } + + return () => (DependencyProperty)value; } var fi = ActuallyGetField(typeInfo, propertyName + "Property"); if (fi != null) { - return () => (DependencyProperty)fi.GetValue(null); + var value = fi.GetValue(null); + + if (value is null) + { + return null; + } + + return () => (DependencyProperty)value; } return null; diff --git a/src/ReactiveUI/Platforms/uap/PlatformRegistrations.cs b/src/ReactiveUI.Uwp/PlatformRegistrations.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/PlatformRegistrations.cs rename to src/ReactiveUI.Uwp/PlatformRegistrations.cs diff --git a/src/ReactiveUI.Uwp/ReactiveUI.Uwp.csproj b/src/ReactiveUI.Uwp/ReactiveUI.Uwp.csproj new file mode 100644 index 0000000000..b1aebccb5b --- /dev/null +++ b/src/ReactiveUI.Uwp/ReactiveUI.Uwp.csproj @@ -0,0 +1,23 @@ + + + + uap10.0.16299 + Provides ReactiveUI extensions for the UWP Library + enable + preview + $(DefineConstants);NETFX_CORE + + + + + + + + + + + + + + + diff --git a/src/ReactiveUI/Platforms/uap/ReactiveUI.rd.xml b/src/ReactiveUI.Uwp/ReactiveUI.rd.xml similarity index 100% rename from src/ReactiveUI/Platforms/uap/ReactiveUI.rd.xml rename to src/ReactiveUI.Uwp/ReactiveUI.rd.xml diff --git a/src/ReactiveUI.Uwp/Registrations.cs b/src/ReactiveUI.Uwp/Registrations.cs new file mode 100644 index 0000000000..53da7021c3 --- /dev/null +++ b/src/ReactiveUI.Uwp/Registrations.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Reactive.Concurrency; + +using Splat; + +namespace ReactiveUI.Uwp +{ + /// + /// .NET Framework platform registrations. + /// + /// + public class Registrations : IWantsToRegisterStuff + { + /// + public void Register(Action, Type> registerFunction) + { + if (registerFunction is null) + { + throw new ArgumentNullException(nameof(registerFunction)); + } + + registerFunction(() => new PlatformOperations(), typeof(IPlatformOperations)); + registerFunction(() => new ActivationForViewFetcher(), typeof(IActivationForViewFetcher)); + registerFunction(() => new DependencyObjectObservableForProperty(), typeof(ICreatesObservableForProperty)); + registerFunction(() => new BooleanToVisibilityTypeConverter(), typeof(IBindingTypeConverter)); + registerFunction(() => new AutoDataTemplateBindingHook(), typeof(IPropertyBindingHook)); + + registerFunction(() => new WinRTAppDataDriver(), typeof(ISuspensionDriver)); + } + } +} diff --git a/src/ReactiveUI/Platforms/net4Desktop/Concurrency/ControlScheduler.cs b/src/ReactiveUI.Uwp/Rx/Concurrency/ControlScheduler.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4Desktop/Concurrency/ControlScheduler.cs rename to src/ReactiveUI.Uwp/Rx/Concurrency/ControlScheduler.cs diff --git a/src/ReactiveUI/Platforms/net4Desktop/Concurrency/DispatcherScheduler.cs b/src/ReactiveUI.Uwp/Rx/Concurrency/DispatcherScheduler.cs similarity index 99% rename from src/ReactiveUI/Platforms/net4Desktop/Concurrency/DispatcherScheduler.cs rename to src/ReactiveUI.Uwp/Rx/Concurrency/DispatcherScheduler.cs index 6028810b3f..030e04fe12 100644 --- a/src/ReactiveUI/Platforms/net4Desktop/Concurrency/DispatcherScheduler.cs +++ b/src/ReactiveUI.Uwp/Rx/Concurrency/DispatcherScheduler.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. // -#if HAS_WPF using System.Reactive.Disposables; using System.Threading; @@ -215,4 +214,3 @@ public IDisposable SchedulePeriodic(TState state, TimeSpan period, Func< } } } -#endif diff --git a/src/ReactiveUI/Platforms/net4Desktop/Internal/Constants.cs b/src/ReactiveUI.Uwp/Rx/Internal/Constants.cs similarity index 97% rename from src/ReactiveUI/Platforms/net4Desktop/Internal/Constants.cs rename to src/ReactiveUI.Uwp/Rx/Internal/Constants.cs index e3d783314c..f977f7635f 100644 --- a/src/ReactiveUI/Platforms/net4Desktop/Internal/Constants.cs +++ b/src/ReactiveUI.Uwp/Rx/Internal/Constants.cs @@ -9,8 +9,6 @@ namespace System.Reactive internal static class Constants_WindowsThreading { -#if HAS_WPF public const string OBSOLETE_INSTANCE_PROPERTY = "Use the Current property to retrieve the DispatcherScheduler instance for the current thread's Dispatcher object."; -#endif } } diff --git a/src/ReactiveUI/Platforms/net4Desktop/Linq/ControlObservable.cs b/src/ReactiveUI.Uwp/Rx/Linq/ControlObservable.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4Desktop/Linq/ControlObservable.cs rename to src/ReactiveUI.Uwp/Rx/Linq/ControlObservable.cs diff --git a/src/ReactiveUI/Platforms/net4Desktop/Linq/DispatcherObservable.cs b/src/ReactiveUI.Uwp/Rx/Linq/DispatcherObservable.cs similarity index 99% rename from src/ReactiveUI/Platforms/net4Desktop/Linq/DispatcherObservable.cs rename to src/ReactiveUI.Uwp/Rx/Linq/DispatcherObservable.cs index 6a4425829e..db94818205 100644 --- a/src/ReactiveUI/Platforms/net4Desktop/Linq/DispatcherObservable.cs +++ b/src/ReactiveUI.Uwp/Rx/Linq/DispatcherObservable.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. // -#if HAS_WPF using System.Reactive.Concurrency; using System.Windows.Threading; @@ -380,4 +379,3 @@ private static IObservable SubscribeOn_(IObservable s #endregion } } -#endif diff --git a/src/ReactiveUI/Platforms/net4Desktop/Linq/Observable.Remoting.cs b/src/ReactiveUI.Uwp/Rx/Linq/Observable.Remoting.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4Desktop/Linq/Observable.Remoting.cs rename to src/ReactiveUI.Uwp/Rx/Linq/Observable.Remoting.cs diff --git a/src/ReactiveUI/Platforms/net4Desktop/Linq/QueryLanguage.Remoting.cs b/src/ReactiveUI.Uwp/Rx/Linq/QueryLanguage.Remoting.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4Desktop/Linq/QueryLanguage.Remoting.cs rename to src/ReactiveUI.Uwp/Rx/Linq/QueryLanguage.Remoting.cs diff --git a/src/ReactiveUI/Platforms/uap/SingleWindowDispatcherScheduler.cs b/src/ReactiveUI.Uwp/SingleWindowDispatcherScheduler.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/SingleWindowDispatcherScheduler.cs rename to src/ReactiveUI.Uwp/SingleWindowDispatcherScheduler.cs diff --git a/src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs b/src/ReactiveUI.Uwp/TransitioningContentControl.Empty.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs rename to src/ReactiveUI.Uwp/TransitioningContentControl.Empty.cs diff --git a/src/ReactiveUI/Platforms/uap/WinRTAppDataDriver.cs b/src/ReactiveUI.Uwp/WinRTAppDataDriver.cs similarity index 100% rename from src/ReactiveUI/Platforms/uap/WinRTAppDataDriver.cs rename to src/ReactiveUI.Uwp/WinRTAppDataDriver.cs diff --git a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj index 09481688d6..6073173bd6 100644 --- a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj +++ b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj @@ -16,6 +16,16 @@ + + + + + + + + + + UserControl diff --git a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj index f056d4094b..6530e299b2 100644 --- a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj +++ b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj @@ -11,7 +11,17 @@ - + + + + + + + + + + + diff --git a/src/ReactiveUI.sln b/src/ReactiveUI.sln index d418cd67ed..edc351be93 100644 --- a/src/ReactiveUI.sln +++ b/src/ReactiveUI.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29001.49 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31612.314 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BD9762CF-E104-481C-96A6-26E624B86283}" ProjectSection(SolutionItems) = preProject @@ -63,7 +63,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{EF7ED1B0-00E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2AE709FA-BE58-4287-BFD3-E80BEB605125}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Maui", "ReactiveUI.Maui\ReactiveUI.Maui.csproj", "{3C552CA0-C364-4E51-8825-35D082C1D5BA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactiveUI.Maui", "ReactiveUI.Maui\ReactiveUI.Maui.csproj", "{3C552CA0-C364-4E51-8825-35D082C1D5BA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Uwp", "ReactiveUI.Uwp\ReactiveUI.Uwp.csproj", "{3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -159,6 +161,10 @@ Global {3C552CA0-C364-4E51-8825-35D082C1D5BA}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C552CA0-C364-4E51-8825-35D082C1D5BA}.Release|Any CPU.ActiveCfg = Release|Any CPU {3C552CA0-C364-4E51-8825-35D082C1D5BA}.Release|Any CPU.Build.0 = Release|Any CPU + {3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -186,6 +192,7 @@ Global {999D555D-C567-457C-95F7-8AD61310C56E} = {EF7ED1B0-00E4-4CD0-9741-0D1D4463B8EC} {46D5C71E-2E58-4454-BE3A-30B9047A2D1E} = {2AE709FA-BE58-4287-BFD3-E80BEB605125} {3C552CA0-C364-4E51-8825-35D082C1D5BA} = {EF7ED1B0-00E4-4CD0-9741-0D1D4463B8EC} + {3684F9E6-BD5F-4C13-8DE8-FFCA8C62F439} = {EF7ED1B0-00E4-4CD0-9741-0D1D4463B8EC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9326B58C-0AD3-4527-B3F4-86B54673C62E} diff --git a/src/ReactiveUI/Mixins/DependencyResolverMixins.cs b/src/ReactiveUI/Mixins/DependencyResolverMixins.cs index 786414729b..39bf2595ad 100644 --- a/src/ReactiveUI/Mixins/DependencyResolverMixins.cs +++ b/src/ReactiveUI/Mixins/DependencyResolverMixins.cs @@ -36,7 +36,8 @@ public static void InitializeReactiveUI(this IMutableDependencyResolver resolver { RegistrationNamespace.Uno, "ReactiveUI.Uno" }, { RegistrationNamespace.Blazor, "ReactiveUI.Blazor" }, { RegistrationNamespace.Drawing, "ReactiveUI.Drawing" }, - { RegistrationNamespace.Maui, "ReactiveUI.Maui" } + { RegistrationNamespace.Maui, "ReactiveUI.Maui" }, + { RegistrationNamespace.Uwp, "ReactiveUI.Uwp" }, }; if (registrationNamespaces.Length == 0) diff --git a/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs b/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs index 74ad0af211..1de4b2ff89 100644 --- a/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs +++ b/src/ReactiveUI/Platforms/android/AndroidCommandBinders.cs @@ -22,7 +22,7 @@ public class AndroidCommandBinders : FlexibleCommandBinder public AndroidCommandBinders() // TODO: Create Test { var view = typeof(View); - Register(view, 9, (cmd, t, cp) => ForEvent(cmd, t, cp, "Click", view.GetRuntimeProperty("Enabled"))); + Register(view, 9, (cmd, t, cp) => ForEvent(cmd, t, cp, "Click", view.GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("Could not find property 'Enabled' on type View, which is needed for binding"))); } /// diff --git a/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs b/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs index 6e5f67e33f..a4a2fc9582 100644 --- a/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs +++ b/src/ReactiveUI/Platforms/android/AndroidObservableForWidgets.cs @@ -85,7 +85,7 @@ private static DispatchItem CreateFromAdapterView() >( eventHandler => { - void Handler(object sender, AdapterView.ItemSelectedEventArgs e) => + void Handler(object? sender, AdapterView.ItemSelectedEventArgs e) => eventHandler(new ObservedChange(adapterView, ex, default)); return Handler; @@ -99,7 +99,7 @@ void Handler(object sender, AdapterView.ItemSelectedEventArgs e) => ObservedChange>( eventHandler => { - void Handler(object sender, AdapterView.NothingSelectedEventArgs e) => + void Handler(object? sender, AdapterView.NothingSelectedEventArgs e) => eventHandler(new ObservedChange(adapterView, ex, default)); return Handler; @@ -160,7 +160,7 @@ private static DispatchItem CreateFromWidget(Expression, ObservedChange>( eventHandler => { - void Handler(object sender, TEventArgs e) => + void Handler(object? sender, TEventArgs e) => eventHandler(new ObservedChange(view, ex, default)); return Handler; diff --git a/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs b/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs index 09ba58382a..2ad64a7b87 100644 --- a/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs +++ b/src/ReactiveUI/Platforms/android/BundleSuspensionDriver.cs @@ -28,7 +28,14 @@ public IObservable LoadState() // TODO: Create Test } var serializer = new BinaryFormatter(); - var st = new MemoryStream(AutoSuspendHelper.LatestBundle.GetByteArray("__state")); + var buffer = AutoSuspendHelper.LatestBundle.GetByteArray("__state"); + + if (buffer is null) + { + return Observable.Throw(new InvalidOperationException("The buffer __state could not be found.")); + } + + var st = new MemoryStream(buffer); return Observable.Return(serializer.Deserialize(st)); } diff --git a/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs b/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs index 76fb8b872c..4641ccb168 100644 --- a/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs +++ b/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs @@ -231,9 +231,16 @@ private static int GetControlIdByName(Assembly assembly, string? name) { var resources = currentAssembly.GetModules().SelectMany(x => x.GetTypes()).First(x => x.Name == "Resource"); - return resources.GetNestedType("Id").GetFields() + var idType = resources.GetNestedType("Id"); + + if (idType is null) + { + throw new InvalidOperationException("Id is not a valid nested type in the resources."); + } + + return idType.GetFields() .Where(x => x.FieldType == typeof(int)) - .ToDictionary(k => k.Name, v => (int)v.GetRawConstantValue(), StringComparer.InvariantCultureIgnoreCase); + .ToDictionary(k => k.Name, v => ((int?)v.GetRawConstantValue()) ?? 0, StringComparer.InvariantCultureIgnoreCase); }); return ids[name]; diff --git a/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs b/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs index dc6ab4b6fb..45541d85a5 100644 --- a/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs +++ b/src/ReactiveUI/Platforms/android/FlexibleCommandBinder.cs @@ -123,7 +123,7 @@ protected static IDisposable ForEvent(ICommand? command, object? target, IObserv Observable.FromEvent( eventHandler => { - void Handler(object sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); + void Handler(object? sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); return Handler; }, x => command.CanExecuteChanged += x, diff --git a/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs b/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs index f658c28583..75b85a889f 100644 --- a/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs +++ b/src/ReactiveUI/Platforms/apple-common/TargetActionCommandBinder.cs @@ -111,7 +111,7 @@ public int GetAffinityForObject(Type type, bool hasEventTarget) Observable.FromEvent( eventHandler => { - void Handler(object sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); + void Handler(object? sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); return Handler; }, x => command.CanExecuteChanged += x, diff --git a/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs b/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs index 8709856a3b..10ac385fc3 100644 --- a/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs +++ b/src/ReactiveUI/Platforms/ios/LinkerOverrides.cs @@ -67,7 +67,7 @@ public void KeepMe() sw.ValueChanged += eh; sw.On = true; - eh.Invoke(null, null); + eh.Invoke(null, EventArgs.Empty); } } } diff --git a/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs b/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs index e204bcec20..90b4fdea0f 100644 --- a/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs +++ b/src/ReactiveUI/Platforms/ios/UIKitCommandBinders.cs @@ -20,9 +20,9 @@ public class UIKitCommandBinders : FlexibleCommandBinder /// public UIKitCommandBinders() { - Register(typeof(UIControl), 9, (cmd, t, cp) => ForTargetAction(cmd, t, cp, typeof(UIControl).GetRuntimeProperty("Enabled"))); - Register(typeof(UIRefreshControl), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "ValueChanged", typeof(UIRefreshControl).GetRuntimeProperty("Enabled"))); - Register(typeof(UIBarButtonItem), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "Clicked", typeof(UIBarButtonItem).GetRuntimeProperty("Enabled"))); + Register(typeof(UIControl), 9, (cmd, t, cp) => ForTargetAction(cmd, t, cp, typeof(UIControl).GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("There is no Enabled property on the UIControl which is needed for binding."))); + Register(typeof(UIRefreshControl), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "ValueChanged", typeof(UIRefreshControl).GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("There is no Enabled property on the UIRefreshControl which is needed for binding."))); + Register(typeof(UIBarButtonItem), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "Clicked", typeof(UIBarButtonItem).GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("There is no Enabled property on the UIBarButtonItem which is needed for binding."))); } /// diff --git a/src/ReactiveUI/Platforms/net4/ComponentModelTypeConverter.cs b/src/ReactiveUI/Platforms/net/ComponentModelTypeConverter.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4/ComponentModelTypeConverter.cs rename to src/ReactiveUI/Platforms/net/ComponentModelTypeConverter.cs diff --git a/src/ReactiveUI/Platforms/net4/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/net/PlatformRegistrations.cs similarity index 100% rename from src/ReactiveUI/Platforms/net4/PlatformRegistrations.cs rename to src/ReactiveUI/Platforms/net/PlatformRegistrations.cs diff --git a/src/ReactiveUI/Platforms/net5/ComponentModelTypeConverter.cs b/src/ReactiveUI/Platforms/net5/ComponentModelTypeConverter.cs deleted file mode 100644 index a73a95d3fd..0000000000 --- a/src/ReactiveUI/Platforms/net5/ComponentModelTypeConverter.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -using System; -using System.ComponentModel; -using Splat; - -namespace ReactiveUI -{ - /// - /// Binding Type Converter for component model. - /// - public class ComponentModelTypeConverter : IBindingTypeConverter - { - private readonly MemoizingMRUCache<(Type fromType, Type toType), TypeConverter?> _typeConverterCache = - new((types, _) => - { - // NB: String is a Magical Type(tm) to TypeConverters. If we are - // converting from string => int, we need the Int converter, not - // the string converter :-/ - if (types.fromType == typeof(string)) - { - types = (types.toType, - types.fromType); - } - - var converter = - TypeDescriptor - .GetConverter(types - .fromType); - return - converter - .CanConvertTo(types.toType) - ? converter - : null; - }, - RxApp.SmallCacheLimit); - - /// - public int GetAffinityForObjects(Type fromType, Type toType) - { - var converter = _typeConverterCache.Get((fromType, toType)); - return converter is not null ? 10 : 0; - } - - /// - public bool TryConvert(object? @from, Type toType, object? conversionHint, out object? result) - { - if (from is null) - { - result = null; - return true; - } - - var fromType = from.GetType(); - var converter = _typeConverterCache.Get((fromType, toType)); - - if (converter is null) - { - throw new ArgumentException($"Can't convert {fromType} to {toType}. To fix this, register a IBindingTypeConverter"); - } - - try - { - // TODO: This should use conversionHint to determine whether this is locale-aware or not - result = (fromType == typeof(string)) ? - converter.ConvertFrom(from) : converter.ConvertTo(from, toType); - - return true; - } - catch (FormatException) - { - result = null; - return false; - } - catch (Exception e) - { - // Errors from ConvertFrom end up here but wrapped in - // outer exception. Add more types here as required. - // IndexOutOfRangeException is given when trying to - // convert empty strings with some/all? converters - if (e.InnerException is IndexOutOfRangeException || - e.InnerException is FormatException) - { - result = null; - return false; - } - - throw new Exception($"Can't convert from {@from.GetType()} to {toType}.", e); - } - } - } -} diff --git a/src/ReactiveUI/Platforms/net5/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/net5/PlatformRegistrations.cs deleted file mode 100644 index 5c5bd21225..0000000000 --- a/src/ReactiveUI/Platforms/net5/PlatformRegistrations.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -using System; -using System.Reactive.Concurrency; -using Splat; - -namespace ReactiveUI -{ - /// - /// Platform registrations for a .NET Core application. - /// - public class PlatformRegistrations : IWantsToRegisterStuff - { - /// - public void Register(Action, Type> registerFunction) - { - if (registerFunction is null) - { - throw new ArgumentNullException(nameof(registerFunction)); - } - - registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter)); - - if (!ModeDetector.InUnitTestRunner()) - { - RxApp.TaskpoolScheduler = TaskPoolScheduler.Default; - RxApp.MainThreadScheduler = DefaultScheduler.Instance; - } - } - } -} diff --git a/src/ReactiveUI/Platforms/net6/ComponentModelTypeConverter.cs b/src/ReactiveUI/Platforms/net6/ComponentModelTypeConverter.cs deleted file mode 100644 index a73a95d3fd..0000000000 --- a/src/ReactiveUI/Platforms/net6/ComponentModelTypeConverter.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -using System; -using System.ComponentModel; -using Splat; - -namespace ReactiveUI -{ - /// - /// Binding Type Converter for component model. - /// - public class ComponentModelTypeConverter : IBindingTypeConverter - { - private readonly MemoizingMRUCache<(Type fromType, Type toType), TypeConverter?> _typeConverterCache = - new((types, _) => - { - // NB: String is a Magical Type(tm) to TypeConverters. If we are - // converting from string => int, we need the Int converter, not - // the string converter :-/ - if (types.fromType == typeof(string)) - { - types = (types.toType, - types.fromType); - } - - var converter = - TypeDescriptor - .GetConverter(types - .fromType); - return - converter - .CanConvertTo(types.toType) - ? converter - : null; - }, - RxApp.SmallCacheLimit); - - /// - public int GetAffinityForObjects(Type fromType, Type toType) - { - var converter = _typeConverterCache.Get((fromType, toType)); - return converter is not null ? 10 : 0; - } - - /// - public bool TryConvert(object? @from, Type toType, object? conversionHint, out object? result) - { - if (from is null) - { - result = null; - return true; - } - - var fromType = from.GetType(); - var converter = _typeConverterCache.Get((fromType, toType)); - - if (converter is null) - { - throw new ArgumentException($"Can't convert {fromType} to {toType}. To fix this, register a IBindingTypeConverter"); - } - - try - { - // TODO: This should use conversionHint to determine whether this is locale-aware or not - result = (fromType == typeof(string)) ? - converter.ConvertFrom(from) : converter.ConvertTo(from, toType); - - return true; - } - catch (FormatException) - { - result = null; - return false; - } - catch (Exception e) - { - // Errors from ConvertFrom end up here but wrapped in - // outer exception. Add more types here as required. - // IndexOutOfRangeException is given when trying to - // convert empty strings with some/all? converters - if (e.InnerException is IndexOutOfRangeException || - e.InnerException is FormatException) - { - result = null; - return false; - } - - throw new Exception($"Can't convert from {@from.GetType()} to {toType}.", e); - } - } - } -} diff --git a/src/ReactiveUI/Platforms/net6/PlatformRegistrations.cs b/src/ReactiveUI/Platforms/net6/PlatformRegistrations.cs deleted file mode 100644 index 5c5bd21225..0000000000 --- a/src/ReactiveUI/Platforms/net6/PlatformRegistrations.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -using System; -using System.Reactive.Concurrency; -using Splat; - -namespace ReactiveUI -{ - /// - /// Platform registrations for a .NET Core application. - /// - public class PlatformRegistrations : IWantsToRegisterStuff - { - /// - public void Register(Action, Type> registerFunction) - { - if (registerFunction is null) - { - throw new ArgumentNullException(nameof(registerFunction)); - } - - registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter)); - - if (!ModeDetector.InUnitTestRunner()) - { - RxApp.TaskpoolScheduler = TaskPoolScheduler.Default; - RxApp.MainThreadScheduler = DefaultScheduler.Instance; - } - } - } -} diff --git a/src/ReactiveUI/Platforms/tvos/LinkerOverrides.cs b/src/ReactiveUI/Platforms/tvos/LinkerOverrides.cs index 32aa43caaf..31881b9fb3 100644 --- a/src/ReactiveUI/Platforms/tvos/LinkerOverrides.cs +++ b/src/ReactiveUI/Platforms/tvos/LinkerOverrides.cs @@ -53,7 +53,7 @@ public void KeepMe() bbi.Clicked += eh; bbi.Clicked -= eh; - eh.Invoke(null, null); + eh.Invoke(null, EventArgs.Empty); } } } diff --git a/src/ReactiveUI/Platforms/tvos/UIKitCommandBinders.cs b/src/ReactiveUI/Platforms/tvos/UIKitCommandBinders.cs index f7ff878b01..a1be7facfd 100644 --- a/src/ReactiveUI/Platforms/tvos/UIKitCommandBinders.cs +++ b/src/ReactiveUI/Platforms/tvos/UIKitCommandBinders.cs @@ -20,8 +20,8 @@ public class UIKitCommandBinders : FlexibleCommandBinder /// public UIKitCommandBinders() { - Register(typeof(UIControl), 9, (cmd, t, cp) => ForTargetAction(cmd, t, cp, typeof(UIControl).GetRuntimeProperty("Enabled"))); - Register(typeof(UIBarButtonItem), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "Clicked", typeof(UIBarButtonItem).GetRuntimeProperty("Enabled"))); + Register(typeof(UIControl), 9, (cmd, t, cp) => ForTargetAction(cmd, t, cp, typeof(UIControl).GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("There is no Enabled property on the UIControl which is needed for binding."))); + Register(typeof(UIBarButtonItem), 10, (cmd, t, cp) => ForEvent(cmd, t, cp, "Clicked", typeof(UIBarButtonItem).GetRuntimeProperty("Enabled") ?? throw new InvalidOperationException("There is no Enabled property on the UIBarButtonItem which is needed for binding."))); } /// diff --git a/src/ReactiveUI/Platforms/uikit-common/CommonReactiveSource.cs b/src/ReactiveUI/Platforms/uikit-common/CommonReactiveSource.cs index 9147b77c9d..3149047fd3 100644 --- a/src/ReactiveUI/Platforms/uikit-common/CommonReactiveSource.cs +++ b/src/ReactiveUI/Platforms/uikit-common/CommonReactiveSource.cs @@ -94,7 +94,7 @@ public int RowsInSection(int section) return count; } - public object ItemAt(NSIndexPath path) + public object? ItemAt(NSIndexPath path) { Debug.Assert(Thread.CurrentThread.ManagedThreadId == _mainThreadId, "The thread is not the main thread."); diff --git a/src/ReactiveUI/Platforms/uikit-common/FlexibleCommandBinder.cs b/src/ReactiveUI/Platforms/uikit-common/FlexibleCommandBinder.cs index db6422cc61..59ad9d72e4 100644 --- a/src/ReactiveUI/Platforms/uikit-common/FlexibleCommandBinder.cs +++ b/src/ReactiveUI/Platforms/uikit-common/FlexibleCommandBinder.cs @@ -124,7 +124,7 @@ protected static IDisposable ForEvent(ICommand? command, object? target, IObserv Observable.FromEvent( eventHandler => { - void Handler(object sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); + void Handler(object? sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); return Handler; }, x => command.CanExecuteChanged += x, @@ -182,7 +182,7 @@ protected static IDisposable ForTargetAction(ICommand? command, object? target, Observable.FromEvent( eventHandler => { - void Handler(object sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); + void Handler(object? sender, EventArgs e) => eventHandler(command.CanExecute(latestParam)); return Handler; }, x => command.CanExecuteChanged += x, diff --git a/src/ReactiveUI/Platforms/uikit-common/ReactiveCollectionViewSource.cs b/src/ReactiveUI/Platforms/uikit-common/ReactiveCollectionViewSource.cs index 1726ef82cc..6e2ad1127d 100644 --- a/src/ReactiveUI/Platforms/uikit-common/ReactiveCollectionViewSource.cs +++ b/src/ReactiveUI/Platforms/uikit-common/ReactiveCollectionViewSource.cs @@ -23,7 +23,7 @@ namespace ReactiveUI public class ReactiveCollectionViewSource : UICollectionViewSource, IReactiveNotifyPropertyChanged>, IHandleObservableErrors, IReactiveObject { private readonly CommonReactiveSource> _commonSource; - private readonly Subject _elementSelected = new(); + private readonly Subject _elementSelected = new(); /// /// Initializes a new instance of the class. @@ -89,7 +89,7 @@ public IReadOnlyList> Data /// /// Gets an IObservable that is a hook to calls. /// - public IObservable ElementSelected => _elementSelected; + public IObservable ElementSelected => _elementSelected; /// /// Gets an Observable that signals *before* a property is about to @@ -138,7 +138,7 @@ public override void ItemSelected(UICollectionView collectionView, NSIndexPath i /// /// The index path. /// The object at the specified index. - public object ItemAt(NSIndexPath indexPath) + public object? ItemAt(NSIndexPath indexPath) { if (indexPath is null) { diff --git a/src/ReactiveUI/Platforms/uikit-common/ReactiveTableViewSource.cs b/src/ReactiveUI/Platforms/uikit-common/ReactiveTableViewSource.cs index 4b73aeef61..dcd4bf98e9 100644 --- a/src/ReactiveUI/Platforms/uikit-common/ReactiveTableViewSource.cs +++ b/src/ReactiveUI/Platforms/uikit-common/ReactiveTableViewSource.cs @@ -25,7 +25,7 @@ namespace ReactiveUI public class ReactiveTableViewSource : UITableViewSource, IReactiveNotifyPropertyChanged>, IHandleObservableErrors, IReactiveObject { private readonly CommonReactiveSource> _commonSource; - private readonly Subject _elementSelected = new(); + private readonly Subject _elementSelected = new(); private readonly UITableViewAdapter _adapter; /// @@ -94,7 +94,7 @@ public IReadOnlyList> Data /// /// Gets an IObservable that is a hook to calls. /// - public IObservable ElementSelected => _elementSelected; + public IObservable ElementSelected => _elementSelected; /// /// Gets or sets the row animation to use when UITableView.InsertSections is invoked. @@ -281,7 +281,7 @@ public override UIView GetViewForFooter(UITableView tableView, nint section) /// /// The index path. /// The item. - public object ItemAt(NSIndexPath indexPath) + public object? ItemAt(NSIndexPath indexPath) { if (indexPath is null) { diff --git a/src/ReactiveUI/Properties/AssemblyInfo.cs b/src/ReactiveUI/Properties/AssemblyInfo.cs index d46b410481..e234544d06 100644 --- a/src/ReactiveUI/Properties/AssemblyInfo.cs +++ b/src/ReactiveUI/Properties/AssemblyInfo.cs @@ -16,3 +16,4 @@ [assembly: InternalsVisibleTo("ReactiveUI.Uno")] [assembly: InternalsVisibleTo("ReactiveUI.Drawing")] [assembly: InternalsVisibleTo("ReactiveUI.TestRunner.Android")] +[assembly: InternalsVisibleTo("ReactiveUI.Uwp")] diff --git a/src/ReactiveUI/ReactiveUI.csproj b/src/ReactiveUI/ReactiveUI.csproj index 6bf74c39d9..641fb9c2a6 100644 --- a/src/ReactiveUI/ReactiveUI.csproj +++ b/src/ReactiveUI/ReactiveUI.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos - $(TargetFrameworks);net461;net472;uap10.0.16299;netcoreapp3.1;net5.0-windows;net6.0-windows;net5.0-windows10.0.19041 + netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;netcoreapp3.1 + $(TargetFrameworks);net461;net472;uap10.0.16299 ReactiveUI ReactiveUI A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the base package with the base platform implementations @@ -10,67 +10,37 @@ preview - - true - true - - - - $(DefineConstants);HAS_WPF - - - - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - + - @@ -81,6 +51,12 @@ + + + + + + @@ -89,24 +65,26 @@ + + + + + + + - - - - - - - - + + + - - + + @@ -124,6 +102,11 @@ + + + + + diff --git a/src/ReactiveUI/RegistrationNamespace.cs b/src/ReactiveUI/RegistrationNamespace.cs index 3cee480004..f9bf3f1627 100644 --- a/src/ReactiveUI/RegistrationNamespace.cs +++ b/src/ReactiveUI/RegistrationNamespace.cs @@ -51,6 +51,11 @@ public enum RegistrationNamespace /// /// Maui. /// - Maui + Maui, + + /// + /// Uwp. + /// + Uwp, } } From 7fd3dc0d8f07b6d90b6c39d471f97ced718276bb Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 20 Aug 2021 18:03:51 +1000 Subject: [PATCH 06/14] Further updates to splat versions --- src/ReactiveUI.Splat.Tests/ReactiveUI.Splat.Tests.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ReactiveUI.Splat.Tests/ReactiveUI.Splat.Tests.csproj b/src/ReactiveUI.Splat.Tests/ReactiveUI.Splat.Tests.csproj index 682a0e8827..66040b8776 100644 --- a/src/ReactiveUI.Splat.Tests/ReactiveUI.Splat.Tests.csproj +++ b/src/ReactiveUI.Splat.Tests/ReactiveUI.Splat.Tests.csproj @@ -9,9 +9,9 @@ - - - + + + From b75aa47aae81493bf42218c6abde28b963d442b7 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 20:01:47 +0100 Subject: [PATCH 07/14] Update minimum Android version to 11 --- .github/ISSUE_TEMPLATE/bug_report.md | 12 ++++++++---- .../ReactiveAppCompatActivity.cs | 1 - .../ReactiveDialogFragment.cs | 1 - src/ReactiveUI.AndroidSupport/ReactiveFragment.cs | 1 - .../ReactiveFragmentActivity.cs | 1 - .../ReactivePagerAdapter.cs | 2 -- .../ReactivePreferenceFragment.cs | 1 - .../ReactiveRecyclerViewAdapter.cs | 1 - .../ReactiveRecyclerViewViewHolder.cs | 2 -- .../ReactiveUI.AndroidSupport.csproj | 4 ++-- src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj | 2 +- src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj | 2 +- .../ReactiveUI.Fody.Helpers.csproj | 2 +- src/ReactiveUI.Testing/ReactiveUI.Testing.csproj | 2 +- src/ReactiveUI.Uno/ReactiveUI.Uno.csproj | 4 ++-- src/ReactiveUI/ReactiveUI.csproj | 2 +- 16 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0502a0a397..c6b4e3dc61 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,16 +20,19 @@ If this is a question please ask on [StackOverflow](https://stackoverflow.com/qu **Steps To Reproduce** - - -**Expected behavior** +**Expected behaviour** @@ -44,6 +47,7 @@ Provide the steps to reproduce the behavior: - OS: - Version - Device: +- ReactiveUI Version: **Additional context** diff --git a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs index 65221e2997..03a1cd274d 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs @@ -55,7 +55,6 @@ public TViewModel? ViewModel /// This is an Activity that is both an Activity and has ReactiveObject powers /// (i.e. you can call RaiseAndSetIfChanged). /// - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public class ReactiveAppCompatActivity : AppCompatActivity, IReactiveObject, IReactiveNotifyPropertyChanged, IHandleObservableErrors { private readonly Subject _activated = new(); diff --git a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs index 406bfcfb4e..b030749c3f 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs @@ -49,7 +49,6 @@ public TViewModel? ViewModel /// This is a Fragment that is both an Activity and has ReactiveObject powers /// (i.e. you can call RaiseAndSetIfChanged). /// - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public class ReactiveDialogFragment : Android.Support.V4.App.DialogFragment, IReactiveNotifyPropertyChanged, IReactiveObject, IHandleObservableErrors { private readonly Subject _activated = new(); diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs index 16528b4b74..bd31ddfe60 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs @@ -49,7 +49,6 @@ public TViewModel? ViewModel /// This is a Fragment that is both an Activity and has ReactiveObject powers /// (i.e. you can call RaiseAndSetIfChanged). /// - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public class ReactiveFragment : Android.Support.V4.App.Fragment, IReactiveNotifyPropertyChanged, IReactiveObject, IHandleObservableErrors { private readonly Subject _activated = new(); diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs index fd16f53a98..cc0a7dd90f 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs @@ -54,7 +54,6 @@ public TViewModel? ViewModel /// This is an Activity that is both an Activity and has ReactiveObject powers /// (i.e. you can call RaiseAndSetIfChanged). /// - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public class ReactiveFragmentActivity : FragmentActivity, IReactiveObject, IReactiveNotifyPropertyChanged, IHandleObservableErrors { private readonly Subject _activated = new(); diff --git a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs index 017e9ca64f..81ece4cdab 100644 --- a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs +++ b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs @@ -22,7 +22,6 @@ namespace ReactiveUI.AndroidSupport /// Observable change set, in a similar fashion to ReactiveTableViewSource. /// /// The view model type. - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public class ReactivePagerAdapter : PagerAdapter, IEnableLogger where TViewModel : class { @@ -138,5 +137,4 @@ public ReactivePagerAdapter( { } } -#pragma warning restore SA1600 // Elements should be documented } diff --git a/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs b/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs index cf2ff93120..e4f6a91646 100644 --- a/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs +++ b/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs @@ -61,7 +61,6 @@ public TViewModel? ViewModel /// This is a PreferenceFragment that is both an Activity and has ReactiveObject powers /// (i.e. you can call RaiseAndSetIfChanged). /// - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public abstract class ReactivePreferenceFragment : PreferenceFragmentCompat, IReactiveNotifyPropertyChanged, IReactiveObject, IHandleObservableErrors { private readonly Subject _activated = new(); diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs index 549d6ae0c5..fa93d94517 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs @@ -21,7 +21,6 @@ namespace ReactiveUI.AndroidSupport /// to create the your based ViewHolder. /// /// The type of ViewModel that this adapter holds. - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")] public abstract class ReactiveRecyclerViewAdapter : RecyclerView.Adapter where TViewModel : class, IReactiveObject { diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs index 4ce5e627f0..73307cb8eb 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs +++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs @@ -28,8 +28,6 @@ public class ReactiveRecyclerViewViewHolder : RecyclerView.ViewHolde /// Gets all public accessible properties. /// [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401: Field should be private", Justification = "Legacy reasons")] - [SuppressMessage("Design", "CA1051: Do not declare visible instance fields", Justification = "Legacy reasons")] - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1306: Field should start with a lower case letter", Justification = "Legacy reasons")] [IgnoreDataMember] protected Lazy AllPublicProperties = null!; diff --git a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj index 7bf0b4184a..f4e89d4568 100644 --- a/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj +++ b/src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj @@ -1,7 +1,7 @@ - + - MonoAndroid10.0 + MonoAndroid11.0 Provides ReactiveUI extensions for the Android Support Library ReactiveUI.AndroidSupport enable diff --git a/src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj b/src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj index d77562aabd..1897105ad8 100644 --- a/src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj +++ b/src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj @@ -1,7 +1,7 @@ - MonoAndroid10.0 + MonoAndroid11.0 Provides ReactiveUI extensions for the AndroidX Library ReactiveUI.AndroidX enable diff --git a/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj b/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj index bb29ac521a..5b444d3fae 100644 --- a/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj +++ b/src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj @@ -1,6 +1,6 @@ - MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos + MonoAndroid11.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos $(TargetFrameworks);net472;uap10.0.16299;netcoreapp3.1;net5.0-windows10.0.19041 ReactiveUI.Drawing ReactiveUI.Drawing diff --git a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj index b8ed079a17..5e5f4ec596 100644 --- a/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj +++ b/src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0 + netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid11.0 $(TargetFrameworks);net472;uap10.0.16299 Fody extension to generate RaisePropertyChange notifications for properties and ObservableAsPropertyHelper properties. mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;xamarin;android;ios;mac;forms;monodroid;monotouch;xamarin.android;xamarin.ios;xamarin.forms;xamarin.mac;xamarin.tvos;wpf;net;netstandard;net472;uwp;tizen;unoplatform;fody; diff --git a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj index cedbee257d..d606464338 100644 --- a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj +++ b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0;net6.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0 + netstandard2.0;net5.0;net6.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid11.0 $(TargetFrameworks);net472;uap10.0.16299;netcoreapp3.1 ReactiveUI.Testing ReactiveUI.Testing diff --git a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj index 8353f660df..a8dfdd3fa0 100644 --- a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj +++ b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj @@ -1,6 +1,6 @@ - netstandard20;MonoAndroid10.0;Xamarin.iOS10;Xamarin.Mac20;net6.0-android;net6.0-ios;net6.0-macos + netstandard20;MonoAndroid11.0;Xamarin.iOS10;Xamarin.Mac20;net6.0-android;net6.0-ios;net6.0-macos $(TargetFrameworks);uap10.0.16299 ReactiveUI.Uno Contains the ReactiveUI platform specific extensions for Uno @@ -22,7 +22,7 @@ - + diff --git a/src/ReactiveUI/ReactiveUI.csproj b/src/ReactiveUI/ReactiveUI.csproj index 641fb9c2a6..4e21e28854 100644 --- a/src/ReactiveUI/ReactiveUI.csproj +++ b/src/ReactiveUI/ReactiveUI.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid10.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;netcoreapp3.1 + netstandard2.0;net5.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid11.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;netcoreapp3.1 $(TargetFrameworks);net461;net472;uap10.0.16299 ReactiveUI ReactiveUI From a75c8665b20bdf8e5faf1c0d5e15a2cc0aa3dffe Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 21:28:31 +0100 Subject: [PATCH 08/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index eb10ca88c9..92a7d8db5c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,9 +51,11 @@ jobs: shell: bash run: | dotnet tool update -g dotnet-vs - vs install preview -sku:enterprise --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal + vs install preview -sku:enterprise --quiet --all echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" +# +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal + - name: Add MSBuild to PATH uses: glennawatson/setup-msbuild@v1.0.3 with: From 1c6c85d58f00a541d27e0188f1c9d5c68439ad65 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 21:50:30 +0100 Subject: [PATCH 09/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 92a7d8db5c..eb10ca88c9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,11 +51,9 @@ jobs: shell: bash run: | dotnet tool update -g dotnet-vs - vs install preview -sku:enterprise --quiet --all + vs install preview -sku:enterprise --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" -# +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal - - name: Add MSBuild to PATH uses: glennawatson/setup-msbuild@v1.0.3 with: From ad9b21ba42e0e90f84ff73c27926e2dfb5c11246 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 21 Aug 2021 11:36:41 +0100 Subject: [PATCH 10/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index eb10ca88c9..593435b154 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -71,12 +71,13 @@ jobs: dotnet restore ReactiveUI.Events.sln working-directory: src - - name: Install Pharmacist and Generate Events - run: | - dotnet tool install -g Pharmacist - pharmacist generate-platform -t uap10.0.16299,uap10.0.17134,uap10.0.17763,uap10.0.18362,uap10.0.19041,xamarin.mac20,xamarin.tvos10,monoandroid10.0,monoandroid11.0,xamarin.ios10,xamarin.watchos10 -o "src/ReactiveUI.Events/" --output-prefix "Events_" - pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-wpf -o "src/ReactiveUI.Events.WPF/" --output-prefix "Events_" - pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-winforms -o "src/ReactiveUI.Events.Winforms/" --output-prefix "Events_" + # Removed until Pharmacist can be released with new package + #- name: Install Pharmacist and Generate Events + # run: | + # dotnet tool install -g Pharmacist + # pharmacist generate-platform -t uap10.0.16299,uap10.0.17134,uap10.0.17763,uap10.0.18362,uap10.0.19041,xamarin.mac20,xamarin.tvos10,monoandroid10.0,monoandroid11.0,xamarin.ios10,xamarin.watchos10 -o "src/ReactiveUI.Events/" --output-prefix "Events_" + # pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-wpf -o "src/ReactiveUI.Events.WPF/" --output-prefix "Events_" + # pharmacist generate-platform -t net461,net462,net47,net471,net472,net48,netcoreapp3.1,net5.0,net6.0 --is-winforms -o "src/ReactiveUI.Events.Winforms/" --output-prefix "Events_" - name: Build run: | From 6203ae756e9bbd54b96d177e2a789edb6674600f Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 21:28:31 +0100 Subject: [PATCH 11/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 593435b154..053b131b32 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,9 +51,11 @@ jobs: shell: bash run: | dotnet tool update -g dotnet-vs - vs install preview -sku:enterprise --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal + vs install preview -sku:enterprise --quiet --all echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" +# +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal + - name: Add MSBuild to PATH uses: glennawatson/setup-msbuild@v1.0.3 with: From 26dd55fd246e29bb1e8e1fa146acefbe37c732f9 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Fri, 20 Aug 2021 21:50:30 +0100 Subject: [PATCH 12/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 053b131b32..593435b154 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -51,11 +51,9 @@ jobs: shell: bash run: | dotnet tool update -g dotnet-vs - vs install preview -sku:enterprise --quiet --all + vs install preview -sku:enterprise --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" -# +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.NetCrossPlat +Microsoft.VisualStudio.Workload.Universal - - name: Add MSBuild to PATH uses: glennawatson/setup-msbuild@v1.0.3 with: From 559383966eae168ff0671bd3628a89df4d038a02 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 21 Aug 2021 14:18:47 +0100 Subject: [PATCH 13/14] Update ci-build.yml --- .github/workflows/ci-build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 55c11deac8..3ed6f61df7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,7 +38,16 @@ jobs: dotnet-version: 6.0.x include-prerelease: true - - name: Install VS2019 preview + - name: Install DotNet workloads + shell: bash + run: | + dotnet workload install android + dotnet workload install ios + dotnet workload install tvos + dotnet workload install macos + dotnet workload install maui + + - name: Install VS2022 preview shell: bash run: | dotnet tool update -g dotnet-vs From f37ae1f078e4db5b78b9c8e5e1243f120b5d1224 Mon Sep 17 00:00:00 2001 From: Chris Pulman Date: Sat, 21 Aug 2021 14:53:28 +0100 Subject: [PATCH 14/14] update Integration tests to Android 11 --- .../IntegrationTests.Android/IntegrationTests.Android.csproj | 2 +- .../IntegrationTests.XamarinForms.Android.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrationtests/IntegrationTests.Android/IntegrationTests.Android.csproj b/integrationtests/IntegrationTests.Android/IntegrationTests.Android.csproj index 901aa0dd02..c8b36909bd 100644 --- a/integrationtests/IntegrationTests.Android/IntegrationTests.Android.csproj +++ b/integrationtests/IntegrationTests.Android/IntegrationTests.Android.csproj @@ -17,7 +17,7 @@ Resources\Resource.Designer.cs Resource Off - v10.0 + v11.0 Properties\AndroidManifest.xml Resources Assets diff --git a/integrationtests/IntegrationTests.XamarinForms.Android/IntegrationTests.XamarinForms.Android.csproj b/integrationtests/IntegrationTests.XamarinForms.Android/IntegrationTests.XamarinForms.Android.csproj index cd841cbbb5..8a5f0ddbbe 100644 --- a/integrationtests/IntegrationTests.XamarinForms.Android/IntegrationTests.XamarinForms.Android.csproj +++ b/integrationtests/IntegrationTests.XamarinForms.Android/IntegrationTests.XamarinForms.Android.csproj @@ -16,7 +16,7 @@ Resources Assets false - v10.0 + v11.0