From f396c32159999686831c2801d4b7c4a538fd54a3 Mon Sep 17 00:00:00 2001
From: Glenn <5834289+glennawatson@users.noreply.github.com>
Date: Wed, 4 Sep 2019 20:22:35 +1000
Subject: [PATCH] housekeeping: Release 10.0 (#2102)
---
.github/CODEOWNERS | 4 +-
CONTRIBUTING.md | 4 +-
README.md | 1 -
integrationtests/Directory.Build.props | 2 +-
.../IntegrationTests.Shared.Tests.csproj | 6 +-
.../IntegrationTests.Shared.csproj | 1 +
.../IntegrationTests.UWP.csproj | 4 +-
.../IntegrationTests.WPF.csproj | 4 +-
.../IntegrationTests.XamarinForms.UWP.csproj | 4 +-
src/Directory.build.props | 2 +-
src/Directory.build.targets | 2 +-
.../ReactiveAppCompatActivity.cs | 18 +-
.../ReactiveFragmentActivity.cs | 18 +-
.../ReactiveRecyclerViewViewHolder.cs | 4 +-
.../PlatformOperations.cs} | 16 +-
.../Properties/launchSettings.json | 27 +
.../ReactiveComponentBase.cs | 130 ++
.../ReactiveLayoutComponentBase.cs | 124 ++
.../ReactiveUI.Blazor.csproj | 16 +
src/ReactiveUI.Blazor/Registrations.cs | 44 +
.../{net461 => net4}/ObservableTrigger.cs | 0
src/ReactiveUI.Blend/ReactiveUI.Blend.csproj | 2 +-
.../ReactiveUI.Events.WPF.csproj | 22 +-
.../ReactiveUI.Events.Winforms.csproj | 26 +-
.../ReactiveUI.Events.csproj | 1 +
src/ReactiveUI.Fody.Tests/FodyWeavers.xsd | 1 +
.../ReactiveUI.Testing.csproj | 2 +-
.../ApiApprovalTests.ReactiveUI.approved.txt | 178 +--
...provalTests.ReactiveUI.net461.approved.txt | 269 ++--
...ests.ReactiveUI.netcoreapp2.0.approved.txt | 269 ++--
...ests.ReactiveUI.netcoreapp3.0.approved.txt | 837 +++++++++++++
...alTests.Testing.netcoreapp3.0.approved.txt | 43 +
.../Activation/ActivatingViewFetcher.cs | 2 +-
.../Activation/ActivatingViewModel.cs | 2 +-
src/ReactiveUI.Tests/Platforms/uwp/App.xaml | 7 -
.../Platforms/uwp/App.xaml.cs | 41 -
.../Legacy/ControlsReactiveCollectionTest.cs | 97 --
.../Legacy/Mocks/LegacyPropertyBindView.cs | 55 -
.../Mocks/LegacyPropertyBindViewModel.cs | 87 --
...ApprovalTests.Winforms.net461.approved.txt | 54 +-
...lTests.Winforms.netcoreapp3.0.approved.txt | 109 ++
.../Platforms/winforms/CommandBindingTests.cs | 4 +-
.../Platforms/winforms/Mocks/TestControl.cs | 2 +-
.../Platforms/winforms/Mocks/TestForm.cs | 2 +-
.../winforms/ReactiveBindingListTests.cs | 221 ----
.../ApiApprovalTests.Wpf.net461.approved.txt | 12 +-
...provalTests.Wpf.netcoreapp3.0.approved.txt | 132 ++
.../Platforms/wpf/Mocks/WpfTestUserControl.cs | 2 +-
.../WpfCommandBindingImplementationTests.cs | 2 +-
src/ReactiveUI.Tests/ReactiveUI.Tests.csproj | 83 +-
.../Utilities/ApiApprovalBase.cs | 2 +-
.../Utilities/CountingTestScheduler.cs | 10 +-
src/ReactiveUI.Tests/Utilities/TestLogger.cs | 12 +-
.../ReactiveNotifyPropertyChangedMixinTest.cs | 561 +++++----
.../ActivationForViewFetcher.cs | 2 +-
...tformRegistrations.cs => Registrations.cs} | 2 +-
src/ReactiveUI.Uno/WinRTAppDataDriver.cs | 79 --
.../ActivationForViewFetcher.cs | 40 +-
.../CreatesWinformsCommandBinding.cs | 20 +-
.../PropertyChangingEventManager.cs | 1 +
.../IReactiveDerivedBindingList.cs | 28 -
.../ObservableCollectionMixin.cs | 176 ---
.../ReactiveBindingList.cs | 131 --
.../ReactiveDerivedBindingList.cs | 94 --
.../ReactiveUI.Winforms.csproj | 16 +-
src/ReactiveUI.Winforms/Registrations.cs | 3 +
.../WinformsCreatesObservableForProperty.cs | 10 +-
.../ActivationForViewFetcher.cs | 32 +-
src/ReactiveUI.Wpf/AutoSuspendHelper.cs | 44 +-
src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj | 14 +-
src/ReactiveUI.Wpf/Registrations.cs | 3 +
.../ActivationForViewFetcher.cs | 56 +-
src/ReactiveUI.XamForms/RoutedViewHost.cs | 13 +-
src/ReactiveUI.sln | 63 +-
.../Activation/CanActivateViewFetcher.cs | 4 +-
.../Activation/IActivationForViewFetcher.cs | 2 +-
src/ReactiveUI/Activation/ViewForMixins.cs | 24 +-
.../Bindings/Command/CreatesCommandBinding.cs | 12 +-
.../Command/CreatesCommandBindingViaEvent.cs | 16 +-
.../Property/IPropertyBinderImplementation.cs | 4 +-
.../Property/PropertyBinderImplementation.cs | 20 +-
.../Property/PropertyBindingMixins.cs | 8 +-
.../EventHandlers/INotifyPropertyChanging.cs | 22 -
.../PropertyChangingEventArgs.cs | 30 -
.../PropertyChangingEventHandler.cs | 15 -
.../CollectionChangingEventManager.cs | 15 -
.../PropertyChangingEventManager.cs | 2 +
src/ReactiveUI/Expression/Reflection.cs | 18 +-
.../{IActivatable.cs => IActivatableView.cs} | 2 +-
...Activation.cs => IActivatableViewModel.cs} | 2 +-
src/ReactiveUI/Interfaces/IViewFor.cs | 2 +-
.../ReactivePropertyChangingEventArgs.cs | 2 +
src/ReactiveUI/Legacy/IMoveInfo.cs | 33 -
.../Legacy/INotifyCollectionChanging.cs | 22 -
src/ReactiveUI/Legacy/IReactiveCollection.cs | 30 -
src/ReactiveUI/Legacy/IReactiveDerivedList.cs | 20 -
src/ReactiveUI/Legacy/IReactiveList.cs | 75 --
.../IReactiveNotifyCollectionChanged.cs | 105 --
.../IReactiveNotifyCollectionItemChanged.cs | 37 -
.../Legacy/IReadOnlyReactiveCollection.cs | 25 -
.../Legacy/IReadOnlyReactiveList.cs | 29 -
src/ReactiveUI/Legacy/MoveInfo.cs | 29 -
.../Legacy/ObservableCollectionMixin.cs | 230 ----
.../Legacy/ReactiveCollectionMixins.cs | 85 --
.../Legacy/ReactiveDerivedCollection.cs | 872 -------------
...ReactiveDerivedCollectionFromObservable.cs | 75 --
src/ReactiveUI/Legacy/ReactiveList.cs | 1084 -----------------
.../Mixins/DependencyResolverMixins.cs | 7 +-
.../ReactiveNotifyPropertyChangedMixin.cs | 16 +-
.../INPCObservableForProperty.cs | 36 +-
.../android/AndroidObservableForWidgets.cs | 58 +-
.../android/FlexibleCommandBinder.cs | 12 +-
.../Platforms/android/ReactiveActivity.cs | 18 +-
.../Platforms/android/ReactiveListAdapter.cs | 97 --
.../android/ReactivePreferenceActivity.cs | 18 +-
.../apple-common/KVOObservableForProperty.cs | 10 +-
.../apple-common/TargetActionCommandBinder.cs | 10 +-
.../ComponentModelTypeConverter.cs | 14 +-
.../{net461 => net4}/PlatformRegistrations.cs | 0
.../PlatformRegistrations.cs | 0
.../ComponentModelTypeConverter.cs | 86 ++
.../netcoreapp3/PlatformRegistrations.cs | 29 +
.../Platforms/uap/ActivationForViewFetcher.cs | 21 +-
.../uap/SingleWindowDispatcherScheduler.cs | 13 +-
.../uikit-common/CommonReactiveSource.cs | 26 +-
.../uikit-common/FlexibleCommandBinder.cs | 20 +-
.../ReactiveCollectionViewSource.cs | 3 +-
.../ReactiveCollectionViewSourceExtensions.cs | 3 +-
.../ReactiveNavigationController.cs | 2 +-
.../uikit-common/ReactiveTableViewSource.cs | 3 -
.../ReactiveTableViewSourceExtensions.cs | 2 +-
.../AutoDataTemplateBindingHook.cs | 2 +
.../windows-common/RoutedViewHost.cs | 24 +-
.../windows-common/ViewModelViewHost.cs | 10 +-
.../ComponentModelTypeConverter.cs | 14 +-
src/ReactiveUI/Properties/AssemblyInfo.cs | 1 +
.../CombinedReactiveCommand.cs | 3 +-
.../ReactiveCommand/ReactiveCommand.cs | 3 +-
.../ReactiveCommand/ReactiveCommandBase.cs | 7 +-
.../ReactiveCommand/ReactiveCommandMixins.cs | 29 +-
src/ReactiveUI/ReactiveUI.csproj | 29 +-
src/ReactiveUI/Routing/MessageBus.cs | 22 +-
src/ReactiveUI/VariadicTemplates.cs | 24 +-
src/ReactiveUI/VariadicTemplates.tt | 4 +-
version.json | 4 +-
145 files changed, 2802 insertions(+), 5236 deletions(-)
rename src/{ReactiveUI/EventManagers/CollectionChangedEventManager.cs => ReactiveUI.Blazor/PlatformOperations.cs} (50%)
create mode 100644 src/ReactiveUI.Blazor/Properties/launchSettings.json
create mode 100644 src/ReactiveUI.Blazor/ReactiveComponentBase.cs
create mode 100644 src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
create mode 100644 src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj
create mode 100644 src/ReactiveUI.Blazor/Registrations.cs
rename src/ReactiveUI.Blend/Platforms/{net461 => net4}/ObservableTrigger.cs (100%)
create mode 100644 src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.0.approved.txt
create mode 100644 src/ReactiveUI.Tests/API/ApiApprovalTests.Testing.netcoreapp3.0.approved.txt
delete mode 100644 src/ReactiveUI.Tests/Platforms/uwp/App.xaml
delete mode 100644 src/ReactiveUI.Tests/Platforms/uwp/App.xaml.cs
delete mode 100644 src/ReactiveUI.Tests/Platforms/windows-xaml/Legacy/ControlsReactiveCollectionTest.cs
delete mode 100644 src/ReactiveUI.Tests/Platforms/windows-xaml/Legacy/Mocks/LegacyPropertyBindView.cs
delete mode 100644 src/ReactiveUI.Tests/Platforms/windows-xaml/Legacy/Mocks/LegacyPropertyBindViewModel.cs
create mode 100644 src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.netcoreapp3.0.approved.txt
delete mode 100644 src/ReactiveUI.Tests/Platforms/winforms/ReactiveBindingListTests.cs
create mode 100644 src/ReactiveUI.Tests/Platforms/wpf/API/ApiApprovalTests.Wpf.netcoreapp3.0.approved.txt
rename src/ReactiveUI.Uno/{PlatformRegistrations.cs => Registrations.cs} (96%)
delete mode 100644 src/ReactiveUI.Uno/WinRTAppDataDriver.cs
delete mode 100644 src/ReactiveUI.Winforms/IReactiveDerivedBindingList.cs
delete mode 100644 src/ReactiveUI.Winforms/ObservableCollectionMixin.cs
delete mode 100644 src/ReactiveUI.Winforms/ReactiveBindingList.cs
delete mode 100644 src/ReactiveUI.Winforms/ReactiveDerivedBindingList.cs
delete mode 100644 src/ReactiveUI/EventHandlers/INotifyPropertyChanging.cs
delete mode 100644 src/ReactiveUI/EventHandlers/PropertyChangingEventArgs.cs
delete mode 100644 src/ReactiveUI/EventHandlers/PropertyChangingEventHandler.cs
delete mode 100644 src/ReactiveUI/EventManagers/CollectionChangingEventManager.cs
rename src/ReactiveUI/Interfaces/{IActivatable.cs => IActivatableView.cs} (93%)
rename src/ReactiveUI/Interfaces/{ISupportsActivation.cs => IActivatableViewModel.cs} (95%)
delete mode 100644 src/ReactiveUI/Legacy/IMoveInfo.cs
delete mode 100644 src/ReactiveUI/Legacy/INotifyCollectionChanging.cs
delete mode 100644 src/ReactiveUI/Legacy/IReactiveCollection.cs
delete mode 100644 src/ReactiveUI/Legacy/IReactiveDerivedList.cs
delete mode 100644 src/ReactiveUI/Legacy/IReactiveList.cs
delete mode 100644 src/ReactiveUI/Legacy/IReactiveNotifyCollectionChanged.cs
delete mode 100644 src/ReactiveUI/Legacy/IReactiveNotifyCollectionItemChanged.cs
delete mode 100644 src/ReactiveUI/Legacy/IReadOnlyReactiveCollection.cs
delete mode 100644 src/ReactiveUI/Legacy/IReadOnlyReactiveList.cs
delete mode 100644 src/ReactiveUI/Legacy/MoveInfo.cs
delete mode 100644 src/ReactiveUI/Legacy/ObservableCollectionMixin.cs
delete mode 100644 src/ReactiveUI/Legacy/ReactiveCollectionMixins.cs
delete mode 100644 src/ReactiveUI/Legacy/ReactiveDerivedCollection.cs
delete mode 100644 src/ReactiveUI/Legacy/ReactiveDerivedCollectionFromObservable.cs
delete mode 100644 src/ReactiveUI/Legacy/ReactiveList.cs
delete mode 100644 src/ReactiveUI/Platforms/android/ReactiveListAdapter.cs
rename src/ReactiveUI/Platforms/{net461 => net4}/ComponentModelTypeConverter.cs (81%)
rename src/ReactiveUI/Platforms/{net461 => net4}/PlatformRegistrations.cs (100%)
rename src/ReactiveUI/Platforms/{netcoreapp2.0 => netcoreapp2}/PlatformRegistrations.cs (100%)
create mode 100644 src/ReactiveUI/Platforms/netcoreapp3/ComponentModelTypeConverter.cs
create mode 100644 src/ReactiveUI/Platforms/netcoreapp3/PlatformRegistrations.cs
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 33045bb74..15bebd94b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -24,8 +24,8 @@ src/ReactiveUI/Platforms/apple-common/* @reactiveui/ios-team @reactiveui/mac-
src/ReactiveUI/Platforms/ios/* @reactiveui/ios-team
src/ReactiveUI/Platforms/mac/* @reactiveui/mac-team
src/ReactiveUI/Platforms/net461/* @reactiveui/wpf-team @reactiveui/winforms-team
-src/ReactiveUI/Platforms/netcoreapp2.0/* @reactiveui/dotnetcore-team @reactiveui/webassembly-team
-src/ReactiveUI/Platforms/uap/* @reactiveui/uwp-team
+src/ReactiveUI/Platforms/netcoreapp/* @reactiveui/dotnetcore-team @reactiveui/webassembly-team
+src/ReactiveUI/Platforms/uap10/* @reactiveui/uwp-team
src/ReactiveUI/Platforms/tizen/* @reactiveui/tizen-team
src/ReactiveUI/Platforms/tvos/* @reactiveui/tvos-team
src/ReactiveUI/Platforms/windows-common/* @reactiveui/wpf-team @reactiveui/winforms-team @reactiveui/uwp-team
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 25628b350..25d815ff1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -142,12 +142,12 @@ from the main (upstream) repository:
## Coding
### Developer Environment
-- Visual Studio 2017 (with latest patches/updates), with the following workloads/components
+- Visual Studio 2019 (with latest patches/updates), with the following workloads/components
- Windows Universal Platform Development workload
- .NET desktop development workload
- Mobile development with .NET workload
- .NET Core cross-platform development
- - Windows 10 SDK 10.0.16299 (individual component)
+ - Windows 10 SDK 10.0.17763.0 (individual component)
- PowerShell
- Android SDK Platform 26 (install through Visual Studio)
diff --git a/README.md b/README.md
index 702520c0c..c1f1bb091 100644
--- a/README.md
+++ b/README.md
@@ -407,4 +407,3 @@ This is how we use the donations:
[Become a backer](https://opencollective.com/reactiveui#backer) and get your image on our README on Github with a link to your site.
-
diff --git a/integrationtests/Directory.Build.props b/integrationtests/Directory.Build.props
index 771ccf8e1..bdac84f34 100644
--- a/integrationtests/Directory.Build.props
+++ b/integrationtests/Directory.Build.props
@@ -32,5 +32,5 @@
-
+
diff --git a/integrationtests/IntegrationTests.Shared.Tests/IntegrationTests.Shared.Tests.csproj b/integrationtests/IntegrationTests.Shared.Tests/IntegrationTests.Shared.Tests.csproj
index a8edf01d0..59f93d4fd 100644
--- a/integrationtests/IntegrationTests.Shared.Tests/IntegrationTests.Shared.Tests.csproj
+++ b/integrationtests/IntegrationTests.Shared.Tests/IntegrationTests.Shared.Tests.csproj
@@ -15,8 +15,8 @@
-
-
+
+
@@ -29,7 +29,7 @@
all
runtime; build; native; contentfiles; analyzers
-
+
diff --git a/integrationtests/IntegrationTests.Shared/IntegrationTests.Shared.csproj b/integrationtests/IntegrationTests.Shared/IntegrationTests.Shared.csproj
index 473445a61..0c5e87dbb 100644
--- a/integrationtests/IntegrationTests.Shared/IntegrationTests.Shared.csproj
+++ b/integrationtests/IntegrationTests.Shared/IntegrationTests.Shared.csproj
@@ -1,4 +1,5 @@
+
netstandard2.0
diff --git a/integrationtests/IntegrationTests.UWP/IntegrationTests.UWP.csproj b/integrationtests/IntegrationTests.UWP/IntegrationTests.UWP.csproj
index f03796941..cec7d6077 100644
--- a/integrationtests/IntegrationTests.UWP/IntegrationTests.UWP.csproj
+++ b/integrationtests/IntegrationTests.UWP/IntegrationTests.UWP.csproj
@@ -11,8 +11,8 @@
IntegrationTests.UWP
en-US
UAP
- 10.0.16299.0
- 10.0.16299.0
+ 10.0.17763.0
+ 10.0.17763.0
14
512
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/integrationtests/IntegrationTests.WPF/IntegrationTests.WPF.csproj b/integrationtests/IntegrationTests.WPF/IntegrationTests.WPF.csproj
index 6704b3901..1eb396b0d 100644
--- a/integrationtests/IntegrationTests.WPF/IntegrationTests.WPF.csproj
+++ b/integrationtests/IntegrationTests.WPF/IntegrationTests.WPF.csproj
@@ -30,8 +30,8 @@
-
+
-
+
\ No newline at end of file
diff --git a/integrationtests/IntegrationTests.XamarinForms.UWP/IntegrationTests.XamarinForms.UWP.csproj b/integrationtests/IntegrationTests.XamarinForms.UWP/IntegrationTests.XamarinForms.UWP.csproj
index 7a7fad814..3d34c646f 100644
--- a/integrationtests/IntegrationTests.XamarinForms.UWP/IntegrationTests.XamarinForms.UWP.csproj
+++ b/integrationtests/IntegrationTests.XamarinForms.UWP/IntegrationTests.XamarinForms.UWP.csproj
@@ -11,8 +11,8 @@
IntegrationTests.XamarinForms.UWP
en-US
UAP
- 10.0.16299.0
- 10.0.16299.0
+ 10.0.17763.0
+ 10.0.17763.0
14
true
512
diff --git a/src/Directory.build.props b/src/Directory.build.props
index f74e34561..ae08dd9dd 100644
--- a/src/Directory.build.props
+++ b/src/Directory.build.props
@@ -66,7 +66,7 @@
-
+
diff --git a/src/Directory.build.targets b/src/Directory.build.targets
index 3499585b3..a0f128bca 100644
--- a/src/Directory.build.targets
+++ b/src/Directory.build.targets
@@ -4,7 +4,7 @@
$(AssemblyName) ($(TargetFramework))
-
+
$(DefineConstants);NETSTANDARD;PORTABLE
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
index e7f9ac7d1..db915c559 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
@@ -60,7 +60,7 @@ public class ReactiveAppCompatActivity : AppCompatActivity, IReactiveObject, IRe
{
private readonly Subject _activated = new Subject();
private readonly Subject _deactivated = new Subject();
- private readonly Subject> _activityResult = new Subject>();
+ private readonly Subject<(int requestCode, Result result, Intent intent)> _activityResult = new Subject<(int requestCode, Result result, Intent intent)>();
///
/// Initializes a new instance of the class.
@@ -124,7 +124,7 @@ public event PropertyChangedEventHandler PropertyChanged
///
/// The activity result.
///
- public IObservable> ActivityResult => _activityResult.AsObservable();
+ public IObservable<(int requestCode, Result result, Intent intent)> ActivityResult => _activityResult.AsObservable();
///
void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args)
@@ -150,13 +150,13 @@ public IDisposable SuppressChangeNotifications()
/// The intent.
/// The request code.
/// A task with the result and intent.
- public Task> StartActivityForResultAsync(Intent intent, int requestCode)
+ public Task<(Result result, Intent intent)> StartActivityForResultAsync(Intent intent, int requestCode)
{
// NB: It's important that we set up the subscription *before* we
// call ActivityForResult
var ret = ActivityResult
- .Where(x => x.Item1 == requestCode)
- .Select(x => Tuple.Create(x.Item2, x.Item3))
+ .Where(x => x.requestCode == requestCode)
+ .Select(x => (x.result, x.intent))
.FirstAsync()
.ToTask();
@@ -170,13 +170,13 @@ public Task> StartActivityForResultAsync(Intent intent, in
/// The type.
/// The request code.
/// A task with the result and intent.
- public Task> StartActivityForResultAsync(Type type, int requestCode)
+ public Task<(Result result, Intent intent)> StartActivityForResultAsync(Type type, int requestCode)
{
// NB: It's important that we set up the subscription *before* we
// call ActivityForResult
var ret = ActivityResult
- .Where(x => x.Item1 == requestCode)
- .Select(x => Tuple.Create(x.Item2, x.Item3))
+ .Where(x => x.requestCode == requestCode)
+ .Select(x => (x.result, x.intent))
.FirstAsync()
.ToTask();
@@ -202,7 +202,7 @@ protected override void OnResume()
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
- _activityResult.OnNext(Tuple.Create(requestCode, resultCode, data));
+ _activityResult.OnNext((requestCode, resultCode, data));
}
///
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
index 8e29d1d61..5b1ce6099 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
@@ -74,7 +74,7 @@ public class ReactiveFragmentActivity : FragmentActivity, IReactiveObject, IReac
{
private readonly Subject _activated = new Subject();
private readonly Subject _deactivated = new Subject();
- private readonly Subject> _activityResult = new Subject>();
+ private readonly Subject<(int requestCode, Result result, Intent intent)> _activityResult = new Subject<(int requestCode, Result result, Intent intent)>();
///
public event PropertyChangingEventHandler PropertyChanging
@@ -112,7 +112,7 @@ public event PropertyChangedEventHandler PropertyChanged
///
/// Gets the activity result.
///
- public IObservable> ActivityResult => _activityResult.AsObservable();
+ public IObservable<(int requestCode, Result result, Intent intent)> ActivityResult => _activityResult.AsObservable();
///
void IReactiveObject.RaisePropertyChanging(PropertyChangingEventArgs args)
@@ -135,13 +135,13 @@ void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args)
/// The intent.
/// The request code.
/// A task with the result and intent.
- public Task> StartActivityForResultAsync(Intent intent, int requestCode)
+ public Task<(Result result, Intent intent)> StartActivityForResultAsync(Intent intent, int requestCode)
{
// NB: It's important that we set up the subscription *before* we
// call ActivityForResult
var ret = ActivityResult
- .Where(x => x.Item1 == requestCode)
- .Select(x => Tuple.Create(x.Item2, x.Item3))
+ .Where(x => x.requestCode == requestCode)
+ .Select(x => (x.result, x.intent))
.FirstAsync()
.ToTask();
@@ -155,13 +155,13 @@ public Task> StartActivityForResultAsync(Intent intent, in
/// The type.
/// The request code.
/// A task with the result and intent.
- public Task> StartActivityForResultAsync(Type type, int requestCode)
+ public Task<(Result result, Intent intent)> StartActivityForResultAsync(Type type, int requestCode)
{
// NB: It's important that we set up the subscription *before* we
// call ActivityForResult
var ret = ActivityResult
- .Where(x => x.Item1 == requestCode)
- .Select(x => Tuple.Create(x.Item2, x.Item3))
+ .Where(x => x.requestCode == requestCode)
+ .Select(x => (x.result, x.intent))
.FirstAsync()
.ToTask();
@@ -187,7 +187,7 @@ protected override void OnResume()
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
- _activityResult.OnNext(Tuple.Create(requestCode, resultCode, data));
+ _activityResult.OnNext((requestCode, resultCode, data));
}
///
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
index 23fac0013..319602da6 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
@@ -104,7 +104,7 @@ public event PropertyChangedEventHandler PropertyChanged
///
/// Gets an observable that signals that this ViewHolder has been selected.
///
- /// The is the ViewModel of this ViewHolder in the .
+ /// The is the ViewModel of this ViewHolder in the .
///
public IObservable SelectedWithViewModel { get; }
@@ -119,7 +119,7 @@ public event PropertyChangedEventHandler PropertyChanged
///
/// Gets an observable that signals that this ViewHolder has been long-clicked.
///
- /// The is the ViewModel of this ViewHolder in the .
+ /// The is the ViewModel of this ViewHolder in the .
///
public IObservable LongClickedWithViewModel { get; }
diff --git a/src/ReactiveUI/EventManagers/CollectionChangedEventManager.cs b/src/ReactiveUI.Blazor/PlatformOperations.cs
similarity index 50%
rename from src/ReactiveUI/EventManagers/CollectionChangedEventManager.cs
rename to src/ReactiveUI.Blazor/PlatformOperations.cs
index fbe11a1f8..5895193b4 100644
--- a/src/ReactiveUI/EventManagers/CollectionChangedEventManager.cs
+++ b/src/ReactiveUI.Blazor/PlatformOperations.cs
@@ -3,13 +3,17 @@
// 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.Collections.Specialized;
-
-namespace ReactiveUI
+namespace ReactiveUI.Blazor
{
-#if !NET_461
- internal class CollectionChangedEventManager : WeakEventManager
+ ///
+ /// Returns the current orientation of the device on Windows.
+ ///
+ public class PlatformOperations : IPlatformOperations
{
+ ///
+ public string GetOrientation()
+ {
+ return null;
+ }
}
-#endif
}
diff --git a/src/ReactiveUI.Blazor/Properties/launchSettings.json b/src/ReactiveUI.Blazor/Properties/launchSettings.json
new file mode 100644
index 000000000..c2b293457
--- /dev/null
+++ b/src/ReactiveUI.Blazor/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:50286/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "ReactiveUI.Blazor": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:50291/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ReactiveUI.Blazor/ReactiveComponentBase.cs b/src/ReactiveUI.Blazor/ReactiveComponentBase.cs
new file mode 100644
index 000000000..44fdac13f
--- /dev/null
+++ b/src/ReactiveUI.Blazor/ReactiveComponentBase.cs
@@ -0,0 +1,130 @@
+// Copyright (c) 2019 .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.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Reactive;
+using System.Reactive.Linq;
+using System.Reactive.Subjects;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+
+namespace ReactiveUI.Blazor
+{
+ ///
+ /// A base component for handling property changes and updating the blazer view appropriately.
+ ///
+ /// The type of view model. Must support INotifyPropertyChanged.
+ public class ReactiveComponentBase : ComponentBase, IViewFor, INotifyPropertyChanged, ICanActivate, IDisposable
+ where T : class, INotifyPropertyChanged
+ {
+ private readonly Subject _initSubject = new Subject();
+ [SuppressMessage("Design", "CA2213: Dispose object", Justification = "Used for deactivation.")]
+ private readonly Subject _deactivateSubject = new Subject();
+
+ private T _viewModel;
+
+ private bool _disposedValue; // To detect redundant calls
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ReactiveComponentBase()
+ {
+ var propertyChangedObservable = this.WhenAnyValue(x => x.ViewModel)
+ .Select(x => Observable.FromEvent(
+ eventHandler =>
+ {
+ void Handler(object sender, PropertyChangedEventArgs e) => eventHandler(Unit.Default);
+
+ return Handler;
+ },
+ eh => x.PropertyChanged += eh,
+ eh => x.PropertyChanged -= eh))
+ .Switch();
+
+ propertyChangedObservable.Do(_ => StateHasChanged()).Subscribe();
+ }
+
+ ///
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ ///
+ public T ViewModel
+ {
+ get => _viewModel;
+ set
+ {
+ if (EqualityComparer.Default.Equals(_viewModel, value))
+ {
+ return;
+ }
+
+ _viewModel = value;
+ OnPropertyChanged();
+ }
+ }
+
+ ///
+ object IViewFor.ViewModel
+ {
+ get => ViewModel;
+ set => ViewModel = (T)value;
+ }
+
+ ///
+ public IObservable Activated => _initSubject.AsObservable();
+
+ ///
+ public IObservable Deactivated => _deactivateSubject.AsObservable();
+
+ ///
+ public void Dispose()
+ {
+ // Do not change this code. Put cleanup code in Dispose(bool disposing) below.
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ ///
+ protected override void OnInit()
+ {
+ _initSubject.OnNext(Unit.Default);
+ base.OnInit();
+ }
+
+ ///
+ /// Invokes the property changed event.
+ ///
+ /// The name of the property.
+ protected virtual void OnPropertyChanged([CallerMemberName]string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ ///
+ /// Cleans up the managed resources of the object.
+ ///
+ /// If it is getting called by the Dispose() method rather than a finalizer.
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!_disposedValue)
+ {
+ if (disposing)
+ {
+ _initSubject?.Dispose();
+
+ _deactivateSubject.OnNext(Unit.Default);
+ }
+
+ _disposedValue = true;
+ }
+ }
+ }
+}
diff --git a/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs b/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
new file mode 100644
index 000000000..367384be6
--- /dev/null
+++ b/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
@@ -0,0 +1,124 @@
+// Copyright (c) 2019 .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.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reactive;
+using System.Reactive.Linq;
+using System.Reactive.Subjects;
+using System.Runtime.CompilerServices;
+using Microsoft.AspNetCore.Components.Layouts;
+
+namespace ReactiveUI.Blazor
+{
+ ///
+ /// A base component for handling property changes and updating the blazer view appropriately.
+ ///
+ /// The type of view model. Must support INotifyPropertyChanged.
+ public class ReactiveLayoutComponentBase : LayoutComponentBase, IViewFor, INotifyPropertyChanged, ICanActivate, IDisposable
+ where T : class, INotifyPropertyChanged
+ {
+ private readonly Subject _initSubject = new Subject();
+
+ private T _viewModel;
+
+ private bool _disposedValue; // To detect redundant calls
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ReactiveLayoutComponentBase()
+ {
+ var propertyChangedObservable = this.WhenAnyValue(x => x.ViewModel)
+ .Select(x => Observable.FromEvent(
+ eventHandler =>
+ {
+ void Handler(object sender, PropertyChangedEventArgs e) => eventHandler(Unit.Default);
+
+ return Handler;
+ },
+ eh => x.PropertyChanged += eh,
+ eh => x.PropertyChanged -= eh))
+ .Switch();
+
+ propertyChangedObservable.Do(_ => StateHasChanged()).Subscribe();
+ }
+
+ ///
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ ///
+ public T ViewModel
+ {
+ get => _viewModel;
+ set
+ {
+ if (EqualityComparer.Default.Equals(_viewModel, value))
+ {
+ return;
+ }
+
+ _viewModel = value;
+ OnPropertyChanged();
+ }
+ }
+
+ ///
+ object IViewFor.ViewModel
+ {
+ get => ViewModel;
+ set => ViewModel = (T)value;
+ }
+
+ ///
+ public IObservable Activated => _initSubject.AsObservable();
+
+ ///
+ public IObservable Deactivated => Observable.Empty();
+
+ ///
+ public void Dispose()
+ {
+ // Do not change this code. Put cleanup code in Dispose(bool disposing) below.
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ ///
+ protected override void OnInit()
+ {
+ _initSubject.OnNext(Unit.Default);
+ base.OnInit();
+ }
+
+ ///
+ /// Invokes the property changed event.
+ ///
+ /// The name of the property.
+ protected virtual void OnPropertyChanged([CallerMemberName]string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ ///
+ /// Cleans up the managed resources of the object.
+ ///
+ /// If it is getting called by the Dispose() method rather than a finalizer.
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!_disposedValue)
+ {
+ if (disposing)
+ {
+ _initSubject?.Dispose();
+ }
+
+ _disposedValue = true;
+ }
+ }
+ }
+}
diff --git a/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj b/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj
new file mode 100644
index 000000000..bdeec96ab
--- /dev/null
+++ b/src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj
@@ -0,0 +1,16 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ReactiveUI.Blazor/Registrations.cs b/src/ReactiveUI.Blazor/Registrations.cs
new file mode 100644
index 000000000..d35862764
--- /dev/null
+++ b/src/ReactiveUI.Blazor/Registrations.cs
@@ -0,0 +1,44 @@
+// Copyright (c) 2019 .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.Collections.Generic;
+using System.Reactive.Concurrency;
+using System.Reactive.PlatformServices;
+using System.Text;
+
+namespace ReactiveUI.Blazor
+{
+ ///
+ /// Blazor 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));
+
+#if NETSTANDARD
+ if (WasmPlatformEnlightenmentProvider.IsWasm)
+ {
+ RxApp.TaskpoolScheduler = WasmScheduler.Default;
+ RxApp.MainThreadScheduler = WasmScheduler.Default;
+ }
+ else
+#endif
+ {
+ RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
+ RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => CurrentThreadScheduler.Instance);
+ }
+ }
+ }
+}
diff --git a/src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs b/src/ReactiveUI.Blend/Platforms/net4/ObservableTrigger.cs
similarity index 100%
rename from src/ReactiveUI.Blend/Platforms/net461/ObservableTrigger.cs
rename to src/ReactiveUI.Blend/Platforms/net4/ObservableTrigger.cs
diff --git a/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj b/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj
index 026809555..3bcc18457 100644
--- a/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj
+++ b/src/ReactiveUI.Blend/ReactiveUI.Blend.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj
index 7fa338b6b..84747c5ec 100644
--- a/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj
+++ b/src/ReactiveUI.Events.WPF/ReactiveUI.Events.WPF.csproj
@@ -1,6 +1,6 @@
- net461
+ netcoreapp3.0;net461
ReactiveUI.Events
Provides Observable-based events API for WPF UI controls/eventhandlers. The contents of this package is automatically generated, please target pull-requests to the code generator.
ReactiveUI.Events.WPF
@@ -15,7 +15,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj
index 3d174711c..6e2417384 100644
--- a/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj
+++ b/src/ReactiveUI.Events.Winforms/ReactiveUI.Events.Winforms.csproj
@@ -1,12 +1,12 @@
- net461
+ netcoreapp3.0;net461
ReactiveUI.Events.Winforms
ReactiveUI.Events
Provides Observable-based events API for Winforms UI controls/eventhandlers. The contents of this package is automatically generated, please target pull-requests to the code generator.
ReactiveUI.Events.Winforms
- true
true
+ true
$(NoWarn);CS1570;CA1812
@@ -14,9 +14,27 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ReactiveUI.Events/ReactiveUI.Events.csproj b/src/ReactiveUI.Events/ReactiveUI.Events.csproj
index c54d4f9f2..46ee91edf 100644
--- a/src/ReactiveUI.Events/ReactiveUI.Events.csproj
+++ b/src/ReactiveUI.Events/ReactiveUI.Events.csproj
@@ -19,6 +19,7 @@
+
diff --git a/src/ReactiveUI.Fody.Tests/FodyWeavers.xsd b/src/ReactiveUI.Fody.Tests/FodyWeavers.xsd
index f3ac47620..5cedd530b 100644
--- a/src/ReactiveUI.Fody.Tests/FodyWeavers.xsd
+++ b/src/ReactiveUI.Fody.Tests/FodyWeavers.xsd
@@ -4,6 +4,7 @@
+
diff --git a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj
index 23c603082..88910e9c9 100644
--- a/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj
+++ b/src/ReactiveUI.Testing/ReactiveUI.Testing.csproj
@@ -1,7 +1,7 @@
netstandard2.0;netcoreapp2.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid81
- $(TargetFrameworks);net461;uap10.0.16299
+ $(TargetFrameworks);net461;uap10.0.16299;netcoreapp3.0
ReactiveUI.Testing
ReactiveUI.Testing
A library to aid in writing unit tests for ReactiveUI projects
diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt
index d4bb95ab0..108e3719e 100644
--- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt
+++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.approved.txt
@@ -40,7 +40,7 @@ namespace ReactiveUI
public class CanActivateViewFetcher : ReactiveUI.IActivationForViewFetcher
{
public CanActivateViewFetcher() { }
- public System.IObservable GetActivationForView(ReactiveUI.IActivatable view) { }
+ public System.IObservable GetActivationForView(ReactiveUI.IActivatableView view) { }
public int GetAffinityForView(System.Type view) { }
}
public class static ChangeSetMixin
@@ -139,10 +139,10 @@ namespace ReactiveUI
public static System.Reflection.MemberInfo GetMemberInfo(this System.Linq.Expressions.Expression expression) { }
public static System.Linq.Expressions.Expression GetParent(this System.Linq.Expressions.Expression expression) { }
}
- public interface IActivatable { }
+ public interface IActivatableView { }
public interface IActivationForViewFetcher
{
- System.IObservable GetActivationForView(ReactiveUI.IActivatable view);
+ System.IObservable GetActivationForView(ReactiveUI.IActivatableView view);
int GetAffinityForView(System.Type view);
}
public interface IBindingTypeConverter : Splat.IEnableLogger
@@ -186,10 +186,6 @@ namespace ReactiveUI
void RegisterScheduler(System.Reactive.Concurrency.IScheduler scheduler, string contract = null);
void SendMessage(T message, string contract = null);
}
- public interface INotifyCollectionChanging
- {
- public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanging;
- }
public interface INotifyPropertyChanging
{
public event ReactiveUI.PropertyChangingEventHandler PropertyChanging;
@@ -304,7 +300,7 @@ namespace ReactiveUI
{
ReactiveUI.RoutingState Router { get; }
}
- public interface ISupportsActivation
+ public interface IActivatableViewModel
{
ReactiveUI.ViewModelActivator Activator { get; }
}
@@ -324,11 +320,11 @@ namespace ReactiveUI
System.IObservable ShouldInvalidateState { get; set; }
System.IObservable ShouldPersistState { get; set; }
}
- public interface IViewFor : ReactiveUI.IActivatable
+ public interface IViewFor : ReactiveUI.IActivatableView
{
object ViewModel { get; set; }
}
- public interface IViewFor : ReactiveUI.IActivatable, ReactiveUI.IViewFor
+ public interface IViewFor : ReactiveUI.IActivatableView, ReactiveUI.IViewFor
where T : class
{
T ViewModel { get; set; }
@@ -667,14 +663,14 @@ namespace ReactiveUI
}
public class static ViewForMixins
{
- public static void WhenActivated(this ReactiveUI.ISupportsActivation @this, System.Func> block) { }
- public static void WhenActivated(this ReactiveUI.ISupportsActivation @this, System.Action> block) { }
- public static void WhenActivated(this ReactiveUI.ISupportsActivation @this, System.Action block) { }
- public static System.IDisposable WhenActivated(this ReactiveUI.IActivatable @this, System.Func> block) { }
- public static System.IDisposable WhenActivated(this ReactiveUI.IActivatable @this, System.Func> block, ReactiveUI.IViewFor view) { }
- public static System.IDisposable WhenActivated(this ReactiveUI.IActivatable @this, System.Action> block) { }
- public static System.IDisposable WhenActivated(this ReactiveUI.IActivatable @this, System.Action> block, ReactiveUI.IViewFor view) { }
- public static System.IDisposable WhenActivated(this ReactiveUI.IActivatable @this, System.Action block, ReactiveUI.IViewFor view = null) { }
+ public static void WhenActivated(this ReactiveUI.IActivatableViewModel @this, System.Func> block) { }
+ public static void WhenActivated(this ReactiveUI.IActivatableViewModel @this, System.Action> block) { }
+ public static void WhenActivated(this ReactiveUI.IActivatableViewModel @this, System.Action block) { }
+ public static System.IDisposable WhenActivated(this ReactiveUI.IActivatableView @this, System.Func> block) { }
+ public static System.IDisposable WhenActivated(this ReactiveUI.IActivatableView @this, System.Func> block, ReactiveUI.IViewFor view) { }
+ public static System.IDisposable WhenActivated(this ReactiveUI.IActivatableView @this, System.Action> block) { }
+ public static System.IDisposable WhenActivated(this ReactiveUI.IActivatableView @this, System.Action> block, ReactiveUI.IViewFor view) { }
+ public static System.IDisposable WhenActivated(this ReactiveUI.IActivatableView @this, System.Action block, ReactiveUI.IViewFor view = null) { }
}
public class static ViewLocator
{
@@ -854,152 +850,6 @@ namespace ReactiveUI
where TSender : class { }
}
}
-namespace ReactiveUI.Legacy
-{
- public interface IMoveInfo
- {
- int From { get; }
- System.Collections.Generic.IEnumerable MovedItems { get; }
- int To { get; }
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReactiveCollection : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, Splat.IEnableLogger, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged
- {
- void Reset();
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReactiveDerivedList : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveCollection, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, ReactiveUI.Legacy.IReadOnlyReactiveCollection, ReactiveUI.Legacy.IReadOnlyReactiveList, Splat.IEnableLogger, System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged, System.IDisposable { }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReactiveList : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveCollection, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, Splat.IEnableLogger, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged
- {
- bool IsEmpty { get; }
- void AddRange(System.Collections.Generic.IEnumerable collection);
- void InsertRange(int index, System.Collections.Generic.IEnumerable collection);
- void RemoveAll(System.Collections.Generic.IEnumerable items);
- void RemoveRange(int index, int count);
- void Sort(System.Collections.Generic.IComparer comparer = null);
- void Sort(System.Comparison comparison);
- void Sort(int index, int count, System.Collections.Generic.IComparer comparer);
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReactiveNotifyCollectionChanged
- {
- System.IObservable BeforeItemsAdded { get; }
- System.IObservable> BeforeItemsMoved { get; }
- System.IObservable BeforeItemsRemoved { get; }
- System.IObservable Changed { get; }
- System.IObservable Changing { get; }
- System.IObservable CountChanged { get; }
- System.IObservable CountChanging { get; }
- System.IObservable IsEmptyChanged { get; }
- System.IObservable ItemsAdded { get; }
- System.IObservable> ItemsMoved { get; }
- System.IObservable ItemsRemoved { get; }
- System.IObservable ShouldReset { get; }
- System.IDisposable SuppressChangeNotifications();
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReactiveNotifyCollectionItemChanged
- {
- bool ChangeTrackingEnabled { get; set; }
- System.IObservable> ItemChanged { get; }
- System.IObservable> ItemChanging { get; }
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReadOnlyReactiveCollection : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveCollection, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, Splat.IEnableLogger, System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged { }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public interface IReadOnlyReactiveList : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveCollection, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, ReactiveUI.Legacy.IReadOnlyReactiveCollection, Splat.IEnableLogger, System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged
- {
- bool IsEmpty { get; }
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public class static ObservableCollectionMixin
- {
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateDerivedCollection(this System.Collections.Generic.IEnumerable @this, System.Func selector, System.Action onRemoved, System.Func filter = null, System.Func orderer = null, System.IObservable signalReset = null, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateDerivedCollection(this System.Collections.Generic.IEnumerable @this, System.Func selector, System.Func filter = null, System.Func orderer = null, System.IObservable signalReset = null, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateDerivedCollection(this System.Collections.Generic.IEnumerable @this, System.Func selector, System.Action onRemoved, System.Func filter = null, System.Func orderer = null, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateDerivedCollection(this System.Collections.Generic.IEnumerable @this, System.Func selector, System.Func filter = null, System.Func orderer = null, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- }
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public class static ReactiveCollectionMixins
- {
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateCollection(this System.IObservable fromObservable, System.Reactive.Concurrency.IScheduler scheduler) { }
- public static ReactiveUI.Legacy.IReactiveDerivedList CreateCollection(this System.IObservable fromObservable, System.Nullable withDelay = null, System.Action onError = null, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- }
- [System.Diagnostics.DebuggerDisplayAttribute("Count = {Count}")]
- [System.Diagnostics.DebuggerTypeProxyAttribute(typeof(ReactiveUI.CollectionDebugView<>))]
- [System.ObsoleteAttribute("ReactiveList is no longer supported. We suggest replacing it with DynamicData htt" +
- "ps://github.com/rolandpheasant/dynamicdata")]
- public class ReactiveList : ReactiveUI.INotifyCollectionChanging, ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, ReactiveUI.Legacy.IReactiveCollection, ReactiveUI.Legacy.IReactiveList, ReactiveUI.Legacy.IReactiveNotifyCollectionChanged, ReactiveUI.Legacy.IReactiveNotifyCollectionItemChanged, ReactiveUI.Legacy.IReadOnlyReactiveCollection, ReactiveUI.Legacy.IReadOnlyReactiveList, Splat.IEnableLogger, System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged
- {
- public ReactiveList() { }
- public ReactiveList(System.Collections.Generic.IEnumerable initialContents) { }
- public ReactiveList(System.Collections.Generic.IEnumerable initialContents = null, double resetChangeThreshold = 0.3, System.Reactive.Concurrency.IScheduler scheduler = null) { }
- public System.IObservable BeforeItemsAdded { get; }
- public System.IObservable> BeforeItemsMoved { get; }
- public System.IObservable BeforeItemsRemoved { get; }
- public System.IObservable Changed { get; }
- public bool ChangeTrackingEnabled { get; set; }
- public System.IObservable Changing { get; }
- public int Count { get; }
- public System.IObservable CountChanged { get; }
- public System.IObservable CountChanging { get; }
- public bool IsEmpty { get; }
- public System.IObservable IsEmptyChanged { get; }
- public virtual bool IsReadOnly { get; }
- public virtual T this[int index] { get; set; }
- public System.IObservable> ItemChanged { get; }
- public System.IObservable> ItemChanging { get; }
- public System.IObservable ItemsAdded { get; }
- public System.IObservable> ItemsMoved { get; }
- public System.IObservable ItemsRemoved { get; }
- [System.Runtime.Serialization.IgnoreDataMemberAttribute()]
- public double ResetChangeThreshold { get; set; }
- public System.IObservable ShouldReset { get; }
- public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged;
- public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanging;
- public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
- public event ReactiveUI.PropertyChangingEventHandler PropertyChanging;
- public virtual void Add(T item) { }
- public virtual void AddRange(System.Collections.Generic.IEnumerable collection) { }
- public int BinarySearch(T item) { }
- public int BinarySearch(T item, System.Collections.Generic.IComparer comparer) { }
- public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) { }
- public virtual void Clear() { }
- protected void ClearItems() { }
- public bool Contains(T item) { }
- public void CopyTo(T[] array, int arrayIndex) { }
- public System.Collections.Generic.IEnumerator GetEnumerator() { }
- public int IndexOf(T item) { }
- public virtual void Insert(int index, T item) { }
- protected void InsertItem(int index, T item) { }
- public virtual void InsertRange(int index, System.Collections.Generic.IEnumerable collection) { }
- public virtual void Move(int oldIndex, int newIndex) { }
- protected void MoveItem(int oldIndex, int newIndex) { }
- protected virtual void RaiseCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) { }
- protected virtual void RaiseCollectionChanging(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) { }
- public virtual bool Remove(T item) { }
- public virtual void RemoveAll(System.Collections.Generic.IEnumerable items) { }
- public virtual void RemoveAt(int index) { }
- protected void RemoveItem(int index) { }
- public virtual void RemoveRange(int index, int count) { }
- public virtual void Reset() { }
- protected void SetItem(int index, T item) { }
- public virtual void Sort(int index, int count, System.Collections.Generic.IComparer comparer) { }
- public virtual void Sort(System.Comparison comparison) { }
- public virtual void Sort(System.Collections.Generic.IComparer comparer = null) { }
- public System.IDisposable SuppressChangeNotifications() { }
- }
-}
namespace System.Reactive.Disposables
{
public class static DisposableMixins { }
diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net461.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net461.approved.txt
index b7fe8eae6..949b9dd96 100644
--- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net461.approved.txt
+++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net461.approved.txt
@@ -1,4 +1,5 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.AndroidSupport")]
+[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Blazor")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Uno")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Winforms")]
@@ -41,7 +42,7 @@ namespace ReactiveUI
public class CanActivateViewFetcher : ReactiveUI.IActivationForViewFetcher
{
public CanActivateViewFetcher() { }
- public System.IObservable GetActivationForView(ReactiveUI.IActivatable view) { }
+ public System.IObservable GetActivationForView(ReactiveUI.IActivatableView view) { }
public int GetAffinityForView(System.Type view) { }
}
public class static ChangeSetMixin
@@ -140,10 +141,14 @@ namespace ReactiveUI
public static System.Reflection.MemberInfo GetMemberInfo(this System.Linq.Expressions.Expression expression) { }
public static System.Linq.Expressions.Expression GetParent(this System.Linq.Expressions.Expression expression) { }
}
- public interface IActivatable { }
+ public interface IActivatableView { }
+ public interface IActivatableViewModel
+ {
+ ReactiveUI.ViewModelActivator Activator { get; }
+ }
public interface IActivationForViewFetcher
{
- System.IObservable GetActivationForView(ReactiveUI.IActivatable view);
+ System.IObservable GetActivationForView(ReactiveUI.IActivatableView view);
int GetAffinityForView(System.Type view);
}
public interface IBindingTypeConverter : Splat.IEnableLogger
@@ -193,14 +198,6 @@ namespace ReactiveUI
public int GetAffinityForObject(System.Type type, string propertyName, bool beforeChanged) { }
public System.IObservable> GetNotificationForProperty(object sender, System.Linq.Expressions.Expression expression, string propertyName, bool beforeChanged, bool suppressWarnings = False) { }
}
- public interface INotifyCollectionChanging
- {
- public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanging;
- }
- public interface INotifyPropertyChanging
- {
- public event ReactiveUI.PropertyChangingEventHandler PropertyChanging;
- }
public interface IObservedChange
{
System.Linq.Expressions.Expression Expression { get; }
@@ -209,11 +206,17 @@ namespace ReactiveUI
}
public interface IPropertyBinderImplementation : Splat.IEnableLogger
{
- ReactiveUI.IReactiveBinding> Bind(TViewModel viewModel, TView view, System.Linq.Expressions.Expression> vmProperty, System.Linq.Expressions.Expression> viewProperty, System.IObservable signalViewUpdate, object conversionHint, ReactiveUI.IBindingTypeConverter vmToViewConverterOverride = null, ReactiveUI.IBindingTypeConverter viewToVMConverterOverride = null)
+ [return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] {
+ "view",
+ "isViewModel"})]
+ ReactiveUI.IReactiveBinding> Bind(TViewModel viewModel, TView view, System.Linq.Expressions.Expression> vmProperty, System.Linq.Expressions.Expression> viewProperty, System.IObservable signalViewUpdate, object conversionHint, ReactiveUI.IBindingTypeConverter vmToViewConverterOverride = null, ReactiveUI.IBindingTypeConverter viewToVMConverterOverride = null)
where TViewModel : class
where TView : class, ReactiveUI.IViewFor
;
- ReactiveUI.IReactiveBinding> Bind(TViewModel viewModel, TView view, System.Linq.Expressions.Expression> vmProperty, System.Linq.Expressions.Expression> viewProperty, System.IObservable signalViewUpdate, System.Func vmToViewConverter, System.Func viewToVmConverter)
+ [return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] {
+ "view",
+ "isViewModel"})]
+ ReactiveUI.IReactiveBinding> Bind(TViewModel viewModel, TView view, System.Linq.Expressions.Expression> vmProperty, System.Linq.Expressions.Expression> viewProperty, System.IObservable signalViewUpdate, System.Func vmToViewConverter, System.Func viewToVmConverter)
where TViewModel : class
where TView : class, ReactiveUI.IViewFor
;
@@ -261,10 +264,10 @@ namespace ReactiveUI
System.IObservable> Changing { get; }
System.IDisposable SuppressChangeNotifications();
}
- public interface IReactiveObject : ReactiveUI.INotifyPropertyChanging, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged
+ public interface IReactiveObject : Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging
{
void RaisePropertyChanged(System.ComponentModel.PropertyChangedEventArgs args);
- void RaisePropertyChanging(ReactiveUI.PropertyChangingEventArgs args);
+ void RaisePropertyChanging(System.ComponentModel.PropertyChangingEventArgs args);
}
public class static IReactiveObjectExtensions
{
@@ -280,7 +283,7 @@ namespace ReactiveUI
string PropertyName { get; }
TSender Sender { get; }
}
- public interface IRoutableViewModel : ReactiveUI.INotifyPropertyChanging, ReactiveUI.IReactiveObject, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged
+ public interface IRoutableViewModel : ReactiveUI.IReactiveObject, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging
{
ReactiveUI.IScreen HostScreen { get; }
string UrlPathSegment { get; }
@@ -294,17 +297,13 @@ namespace ReactiveUI
int GetAffinityForObjects(System.Type fromType, System.Type toType);
object PerformSet(object toTarget, object newValue, object[] arguments);
}
- public interface ISupportsActivation
- {
- ReactiveUI.ViewModelActivator Activator { get; }
- }
public interface ISuspensionDriver
{
System.IObservable InvalidateState();
System.IObservable