/
PlatformRegistrations.cs
31 lines (28 loc) · 1.07 KB
/
PlatformRegistrations.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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.Reactive.Concurrency;
using Splat;
namespace ReactiveUI
{
/// <summary>
/// .NET Framework platform registrations.
/// </summary>
/// <seealso cref="ReactiveUI.IWantsToRegisterStuff" />
public class PlatformRegistrations : IWantsToRegisterStuff
{
/// <inheritdoc/>
public void Register(Action<Func<object>, Type> registerFunction)
{
if (registerFunction == null)
{
throw new ArgumentNullException(nameof(registerFunction));
}
registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter));
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
RxApp.MainThreadScheduler = DefaultScheduler.Instance;
}
}
}