зеркало из https://github.com/dotnet/razor.git
Update TestExportJoinableTaskContext to support DispatcherSynchronizationContext
This commit is contained in:
Родитель
3856119bfa
Коммит
b605a2a9ef
|
@ -26,4 +26,8 @@
|
|||
<PackageReference Include="Xunit.Combinatorial" Version="$(XunitCombinatorialPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -8,6 +8,10 @@ using System.Threading;
|
|||
using Microsoft.VisualStudio.Threading;
|
||||
using Xunit.Sdk;
|
||||
|
||||
#if NETFRAMEWORK
|
||||
using System.Windows.Threading;
|
||||
#endif
|
||||
|
||||
#if false
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
@ -44,7 +48,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Common
|
|||
{
|
||||
Thread mainThread;
|
||||
SynchronizationContext synchronizationContext;
|
||||
#if false
|
||||
#if NETFRAMEWORK
|
||||
if (SynchronizationContext.Current is DispatcherSynchronizationContext)
|
||||
{
|
||||
// The current thread is the main thread, and provides a suitable synchronization context
|
||||
|
|
Загрузка…
Ссылка в новой задаче