diff --git a/src/Directory.build.targets b/src/Directory.build.targets index 70f7f3203f..bc1494505b 100644 --- a/src/Directory.build.targets +++ b/src/Directory.build.targets @@ -18,8 +18,11 @@ $(DefineConstants);MONO;ANDROID + + $(DefineConstants);NETCOREAPP + - \ No newline at end of file + diff --git a/src/ReactiveUI/CreatesCommandBinding.cs b/src/ReactiveUI/CreatesCommandBinding.cs index e6b1603674..bc8b0b2d1b 100755 --- a/src/ReactiveUI/CreatesCommandBinding.cs +++ b/src/ReactiveUI/CreatesCommandBinding.cs @@ -21,11 +21,11 @@ public class CreatesCommandBindingViaEvent : ICreatesCommandBinding { // NB: These are in priority order static readonly List> defaultEventsToBind = new List>() { -#if !MONO && !PORTABLE +#if !MONO && !PORTABLE && !NETCOREAPP Tuple.Create("Click", typeof (RoutedEventArgs)), #endif Tuple.Create("TouchUpInside", typeof (EventArgs)), -#if !MONO && !NETFX_CORE && !PORTABLE +#if !MONO && !NETFX_CORE && !PORTABLE && !NETCOREAPP Tuple.Create("MouseUp", typeof (MouseButtonEventArgs)), #elif NETFX_CORE Tuple.Create("PointerReleased", typeof(PointerRoutedEventArgs)), diff --git a/src/ReactiveUI/Platforms/shared/Registrations.cs b/src/ReactiveUI/Platforms/shared/Registrations.cs index 90eeadc044..ac4d3f1c3e 100644 --- a/src/ReactiveUI/Platforms/shared/Registrations.cs +++ b/src/ReactiveUI/Platforms/shared/Registrations.cs @@ -12,13 +12,15 @@ public class PlatformRegistrations : IWantsToRegisterStuff { public void Register(Action, Type> registerFunction) { +#if !NETCOREAPP registerFunction(() => new PlatformOperations(), typeof(IPlatformOperations)); +#endif -#if !NETFX_CORE && !WP8 && !WP81 +#if !NETFX_CORE && !WP8 && !WP81 && !NETCOREAPP registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter)); #endif -#if !MONO +#if !MONO && !NETCOREAPP registerFunction(() => new ActivationForViewFetcher(), typeof(IActivationForViewFetcher)); registerFunction(() => new DependencyObjectObservableForProperty(), typeof(ICreatesObservableForProperty)); registerFunction(() => new BooleanToVisibilityTypeConverter(), typeof(IBindingTypeConverter)); @@ -50,7 +52,7 @@ public void Register(Action, Type> registerFunction) RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => new NSRunloopScheduler()); #endif -#if !MONO && !NETFX_CORE +#if !MONO && !NETFX_CORE && !NETCOREAPP RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current); #endif @@ -58,6 +60,11 @@ public void Register(Action, Type> registerFunction) RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => CoreDispatcherScheduler.Current); #endif +#if NETCOREAPP + // TODO does something for the MainThreadScheduler need to go here? + // interesting to note that when MONO is defined, MainThreadScheduler does not get set. +#endif + #if ANDROID RxApp.MainThreadScheduler = HandlerScheduler.MainThreadScheduler; #endif diff --git a/src/ReactiveUI/ReactiveUI.csproj b/src/ReactiveUI/ReactiveUI.csproj index 9e9acf192c..d637ca635f 100644 --- a/src/ReactiveUI/ReactiveUI.csproj +++ b/src/ReactiveUI/ReactiveUI.csproj @@ -1,6 +1,6 @@  - netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70 + netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70;netcoreapp1.1 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. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8.1, Windows Store and Universal Windows Platform (UWP). @@ -59,6 +59,10 @@ + + + + @@ -69,4 +73,4 @@ - \ No newline at end of file +