未验证 提交 c62e7e02 编写于 作者: J Jason Malinowski 提交者: GitHub

Merge pull request #27475 from Therzok/xwt-synchronization-context

Add support for VSMac unit test synchronization context
......@@ -13,6 +13,7 @@ internal enum ForegroundThreadDataKind
JoinableTask,
ForcedByPackageInitialize,
MonoDevelopGtk,
MonoDevelopXwt,
Unknown
}
......@@ -28,9 +29,9 @@ static ForegroundThreadDataInfo()
internal static ForegroundThreadDataKind CreateDefault(ForegroundThreadDataKind defaultKind)
{
var syncConextTypeName = SynchronizationContext.Current?.GetType().FullName;
var syncContextTypeName = SynchronizationContext.Current?.GetType().FullName;
switch (syncConextTypeName)
switch (syncContextTypeName)
{
case "System.Windows.Threading.DispatcherSynchronizationContext":
......@@ -48,6 +49,10 @@ internal static ForegroundThreadDataKind CreateDefault(ForegroundThreadDataKind
return MonoDevelopGtk;
case "Xwt.XwtSynchronizationContext":
return MonoDevelopXwt;
default:
return defaultKind;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册