Skip to content
Permalink
Browse files

housekeeping: match master @ 121458e (#2089)

  • Loading branch information...
glennawatson committed Jun 26, 2019
1 parent 0d9a991 commit 7cdde713ab476a4239d36151a4acfd46042fe7af
Showing with 609 additions and 86 deletions.
  1. +1 −1 README.md
  2. +1 −0 build.cake
  3. +1 −1 src/Directory.build.props
  4. +0 −49 src/EventBuilder/Platforms/NetCoreAppWpf.cs
  5. +2 −2 src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj
  6. +1 −1 src/ReactiveUI.Fody/ReactiveUI.Fody.csproj
  7. +1 −1 src/ReactiveUI.Testing/ReactiveUI.Testing.csproj
  8. +1 −0 src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net461.approved.txt
  9. +1 −0 src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp2.0.approved.txt
  10. +66 −0 src/ReactiveUI.Uno/ActivationForViewFetcher.cs
  11. +251 −0 src/ReactiveUI.Uno/CoreDispatcherScheduler.cs
  12. +42 −0 src/ReactiveUI.Uno/PlatformRegistrations.cs
  13. +43 −0 src/ReactiveUI.Uno/ReactiveUI.Uno.csproj
  14. +74 −0 src/ReactiveUI.Uno/WinRTAppDataDriver.cs
  15. +63 −4 src/ReactiveUI.sln
  16. +3 −2 src/ReactiveUI/Mixins/DependencyResolverMixins.cs
  17. +1 −3 src/ReactiveUI/Platforms/uap/ActivationForViewFetcher.cs
  18. +7 −1 src/ReactiveUI/Platforms/uap/TransitioningContentControl.Empty.cs
  19. +6 −5 src/ReactiveUI/Platforms/windows-common/AutoDataTemplateBindingHook.cs
  20. +2 −2 src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityHint.cs
  21. +2 −2 src/ReactiveUI/Platforms/windows-common/BooleanToVisibilityTypeConverter.cs
  22. +1 −1 src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs
  23. +7 −3 src/ReactiveUI/Platforms/windows-common/ReactivePage.cs
  24. +10 −4 src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs
  25. +8 −2 src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs
  26. +13 −2 src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs
  27. +1 −0 src/ReactiveUI/Properties/AssemblyInfo.cs
@@ -17,7 +17,7 @@
<br>
<br>
<a href="https://github.com/reactiveui/reactiveui">
<img width="160" heigth="160" src="https://github.com/reactiveui/styleguide/blob/master/logo/logo.svg">
<img width="160" heigth="160" src="https://raw.githubusercontent.com/reactiveui/styleguide/master/logo/main.png">
</a>
<br>
<h1>What is ReactiveUI?</h1>
@@ -24,6 +24,7 @@ var packageWhitelist = new List<FilePath>
MakeAbsolute(File("./src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj")),
MakeAbsolute(File("./src/ReactiveUI.AndroidSupport/ReactiveUI.AndroidSupport.csproj")),
MakeAbsolute(File("./src/ReactiveUI.XamForms/ReactiveUI.XamForms.csproj")),
MakeAbsolute(File("./src/ReactiveUI.Uno/ReactiveUI.Uno.csproj")),
};

if (IsRunningOnWindows())
@@ -67,7 +67,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.38" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.183" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>

This file was deleted.

@@ -14,8 +14,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="5.0.6" PrivateAssets="None" />
<PackageReference Include="FodyPackaging" Version="5.0.6" PrivateAssets="All" />
<PackageReference Include="Fody" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="FodyPackaging" Version="5.1.0" PrivateAssets="All" />
<PackageReference Include="System.Reactive" Version="4.2.0-preview.566" />
</ItemGroup>

@@ -7,6 +7,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FodyHelpers" Version="5.0.6" />
<PackageReference Include="FodyHelpers" Version="5.1.0" />
</ItemGroup>
</Project>
@@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Reactive.Testing" Version="4.1.5" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="4.2.0-preview.566" />
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
</ItemGroup>

@@ -1,5 +1,6 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.AndroidSupport")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Uno")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Winforms")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Wpf")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.XamForms")]
@@ -1,5 +1,6 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.AndroidSupport")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Uno")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Winforms")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.Wpf")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("ReactiveUI.XamForms")]
@@ -0,0 +1,66 @@
// 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.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reflection;

using Windows.Foundation;
using Windows.UI.Xaml;

namespace ReactiveUI
{
/// <summary>
/// ActiveationForViewFetcher is how ReactiveUI determine when a
/// View is activated or deactivated. This is usually only used when porting
/// ReactiveUI to a new UI framework.
/// </summary>
public class ActivationForViewFetcher : IActivationForViewFetcher
{
/// <inheritdoc/>
public int GetAffinityForView(Type view)
{
return typeof(FrameworkElement).GetTypeInfo().IsAssignableFrom(view.GetTypeInfo()) ? 10 : 0;
}

/// <inheritdoc/>
public IObservable<bool> GetActivationForView(IActivatable view)
{
var fe = view as FrameworkElement;

if (fe == null)
{
return Observable<bool>.Empty;
}

#pragma warning disable SA1114 // Parameter list after.
#if NETSTANDARD || MAC
var viewLoaded = Observable.FromEvent<RoutedEventHandler, bool>(
#else
var viewLoaded = Observable.FromEvent<TypedEventHandler<DependencyObject, object>, bool>(
#endif
eventHandler => (_, __) => eventHandler(true),
x => fe.Loading += x,
x => fe.Loading -= x);

var viewUnloaded = Observable.FromEvent<RoutedEventHandler, bool>(
handler =>
{
void EventHandler(object sender, RoutedEventArgs e) => handler(false);
return EventHandler;
},
x => fe.Unloaded += x,
x => fe.Unloaded -= x);

return viewLoaded
.Merge(viewUnloaded)
.Select(b => b ? fe.WhenAnyValue(x => x.IsHitTestVisible).SkipWhile(x => !x) : Observables.False)
.Switch()
.DistinctUntilChanged();
}
}
}

0 comments on commit 7cdde71

Please sign in to comment.
You can’t perform that action at this time.