Browse Source

feature: Disable ReactiveUI platform registrations

pull/5727/head
artyom 6 years ago
parent
commit
65792cf4b0
  1. 2
      build/ReactiveUI.props
  2. 2
      src/Avalonia.ReactiveUI/AppBuilderExtensions.cs

2
build/ReactiveUI.props

@ -1,5 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<PackageReference Include="ReactiveUI" Version="12.1.1" /> <PackageReference Include="ReactiveUI" Version="13.2.10" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
src/Avalonia.ReactiveUI/AppBuilderExtensions.cs

@ -17,6 +17,8 @@ namespace Avalonia.ReactiveUI
{ {
return builder.AfterPlatformServicesSetup(_ => return builder.AfterPlatformServicesSetup(_ =>
{ {
PlatformRegistrationManager.SetRegistrationNamespaces(RegistrationNamespace.Avalonia);
Locator.CurrentMutable.InitializeReactiveUI();
RxApp.MainThreadScheduler = AvaloniaScheduler.Instance; RxApp.MainThreadScheduler = AvaloniaScheduler.Instance;
Locator.CurrentMutable.RegisterConstant(new AvaloniaActivationForViewFetcher(), typeof(IActivationForViewFetcher)); Locator.CurrentMutable.RegisterConstant(new AvaloniaActivationForViewFetcher(), typeof(IActivationForViewFetcher));
Locator.CurrentMutable.RegisterConstant(new AutoDataTemplateBindingHook(), typeof(IPropertyBindingHook)); Locator.CurrentMutable.RegisterConstant(new AutoDataTemplateBindingHook(), typeof(IPropertyBindingHook));

Loading…
Cancel
Save