Skip to content

Commit

Permalink
fix: uno not including ReactiveUI NuGet package (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored and RLittlesII committed Jun 27, 2019
1 parent 121458e commit 7d16f20
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/ReactiveUI.Uno/ActivationForViewFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Windows.Foundation;
using Windows.UI.Xaml;

namespace ReactiveUI
namespace ReactiveUI.Uno
{
/// <summary>
/// ActiveationForViewFetcher is how ReactiveUI determine when a
Expand Down
6 changes: 4 additions & 2 deletions src/ReactiveUI.Uno/PlatformRegistrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Reactive.Concurrency;
using System.Reactive.PlatformServices;

namespace ReactiveUI
namespace ReactiveUI.Uno
{
/// <summary>
/// UWP platform registrations.
Expand All @@ -23,7 +23,9 @@ public void Register(Action<Func<object>, Type> registerFunction)
registerFunction(() => new DependencyObjectObservableForProperty(), typeof(ICreatesObservableForProperty));
registerFunction(() => new BooleanToVisibilityTypeConverter(), typeof(IBindingTypeConverter));
registerFunction(() => new AutoDataTemplateBindingHook(), typeof(IPropertyBindingHook));
registerFunction(() => new WinRTAppDataDriver(), typeof(ISuspensionDriver));

// Re-enable once the obsolete code in Uno has been worked out.
////registerFunction(() => new WinRTAppDataDriver(), typeof(ISuspensionDriver));

#if NETSTANDARD
if (WasmPlatformEnlightenmentProvider.IsWasm)
Expand Down
17 changes: 4 additions & 13 deletions src/ReactiveUI.Uno/ReactiveUI.Uno.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Uno.UI" Version="1.44.1" />
<PackageReference Include="System.Reactive" Version="4.1.5" />
<PackageReference Include="Splat" Version="7.*" />
<PackageReference Include="DynamicData" Version="6.*" />
<PackageReference Include="Uno.UI" Version="1.*" />
</ItemGroup>

<ItemGroup>
<!-- Include all the files under RxUI, due to the way Uno works we need to duplicate -->
<Compile Include="..\ReactiveUI\**\*.cs" LinkBase="ReactiveUI" />

<Compile Remove="..\ReactiveUI\Platforms\**\*.*" />
<Compile Remove="..\ReactiveUI\**\bin\**\*.*" />
<Compile Remove="..\ReactiveUI\**\obj\**\*.*" />

<Compile Remove=".\Platforms\**\*.*" />

<Compile Include="..\ReactiveUI\Platforms\uap\TransitioningContentControl.Empty.cs" LinkBase="ReactiveUI\Platforms\uap" />
<Compile Include="..\ReactiveUI\Platforms\uap\DependencyObjectObservableForProperty.cs" LinkBase="ReactiveUI\Platforms\uap" />
<Compile Include="..\ReactiveUI\Platforms\windows-common\**\*.cs" LinkBase="ReactiveUI\Platforms\windows-common" />
Expand All @@ -40,4 +28,7 @@
<Compile Include=".\Platforms\netstandard\**\*.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/ReactiveUI.Uno/WinRTAppDataDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using Windows.Storage;
using UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding;

namespace ReactiveUI
namespace ReactiveUI.Uno
{
/// <summary>
/// Loads and saves state to persistent storage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
using Splat;
using Windows.UI.Xaml;

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// Creates a observable for a property if available that is based on a DependencyProperty.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
using System.Diagnostics.CodeAnalysis;
using Windows.UI.Xaml.Controls;

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// A control with a single transition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
using System.Windows.Markup;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// AutoDataTemplateBindingHook is a binding hook that checks ItemsControls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
using System.Windows;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// Enum that hints at the visibility of a ui element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
using System.Windows;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// This type convert converts between Boolean and XAML Visibility - the
Expand Down
4 changes: 4 additions & 0 deletions src/ReactiveUI/Platforms/windows-common/PlatformOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
using System.Text;
using System.Threading.Tasks;

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// Returns the current orientation of the device on Windows.
Expand Down
18 changes: 11 additions & 7 deletions src/ReactiveUI/Platforms/windows-common/ReactivePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace ReactiveUI
{
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
#if NETFX_CORE || HAS_UNO
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Controls;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// A <see cref="Page"/> that is reactive.
/// </summary>
Expand Down
18 changes: 11 additions & 7 deletions src/ReactiveUI/Platforms/windows-common/ReactiveUserControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace ReactiveUI
{
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
#if NETFX_CORE || HAS_UNO
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Controls;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// A <see cref="UserControl"/> that is reactive.
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions src/ReactiveUI/Platforms/windows-common/RoutedViewHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
using System.Windows.Controls;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// This control hosts the View associated with a Router, and will display
Expand Down
4 changes: 4 additions & 0 deletions src/ReactiveUI/Platforms/windows-common/ViewModelViewHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
using System.Windows.Controls;
#endif

#if HAS_UNO
namespace ReactiveUI.Uno
#else
namespace ReactiveUI
#endif
{
/// <summary>
/// This content control will automatically load the View associated with
Expand Down

0 comments on commit 7d16f20

Please sign in to comment.