Skip to content

Commit

Permalink
feature: add netcoreapp build (reactiveui#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky authored and olevett committed Aug 26, 2017
1 parent e8227e8 commit c1285aa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'MonoAndroid70'">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform " Version="5.2.2" />
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI/Platforms/net45/PlatformRegistrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void Register(Action<Func<object>, Type> registerFunction)
{
registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter));
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current);
RxApp.MainThreadScheduler = DefaultScheduler.Instance;
}
}
}
18 changes: 18 additions & 0 deletions src/ReactiveUI/Platforms/netcoreapp1.0/PlatformRegistrations.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.

using System;
using System.Reactive.Concurrency;

namespace ReactiveUI
{
public class PlatformRegistrations : IWantsToRegisterStuff
{
public void Register(Action<Func<object>, Type> registerFunction)
{
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
RxApp.MainThreadScheduler = DefaultScheduler.Instance;
}
}
}
8 changes: 6 additions & 2 deletions src/ReactiveUI/ReactiveUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70</TargetFrameworks>
<TargetFrameworks>netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70;netcoreapp1.0</TargetFrameworks>
<AssemblyName>ReactiveUI</AssemblyName>
<RootNamespace>ReactiveUI</RootNamespace>
<Description>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. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8.1, Windows Store and Universal Windows Platform (UWP).</Description>
Expand Down Expand Up @@ -51,7 +51,11 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'MonoAndroid70' ">
<Compile Include="Platforms\android\**\*.cs" />
<Compile Include="Platforms\xamarin-common\**\*.cs" />
</ItemGroup>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<Compile Include="Platforms\netcoreapp1.0\**\*.cs" />
</ItemGroup>

<ItemGroup>
<None Update="VariadicTemplates.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="VariadicTemplates.cs" />
Expand Down

0 comments on commit c1285aa

Please sign in to comment.