Skip to content

Commit

Permalink
Merge pull request #27475 from Therzok/xwt-synchronization-context
Browse files Browse the repository at this point in the history
Add support for VSMac unit test synchronization context
  • Loading branch information
jasonmalinowski authored Jun 6, 2018
2 parents 7e1b105 + 49ad1fb commit c62e7e0
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ internal enum ForegroundThreadDataKind
JoinableTask,
ForcedByPackageInitialize,
MonoDevelopGtk,
MonoDevelopXwt,
Unknown
}

Expand All @@ -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":

Expand All @@ -48,6 +49,10 @@ internal static ForegroundThreadDataKind CreateDefault(ForegroundThreadDataKind

return MonoDevelopGtk;

case "Xwt.XwtSynchronizationContext":

return MonoDevelopXwt;

default:

return defaultKind;
Expand Down

0 comments on commit c62e7e0

Please sign in to comment.