Ejemplo n.º 1
0
        private static SynchronizationContext GetWinRTContext()
        {
            if (!AppDomain.IsAppXModel())
            {
                return((SynchronizationContext)null);
            }
            object forCurrentThread = SynchronizationContext.GetWinRTDispatcherForCurrentThread();

            if (forCurrentThread != null)
            {
                return(SynchronizationContext.GetWinRTSynchronizationContextFactory().Create(forCurrentThread));
            }
            return((SynchronizationContext)null);
        }