Esempio n. 1
0
        private static SynchronizationContext GetThreadLocalContext()
        {
            SynchronizationContext context = null;

#if FEATURE_CORECLR
#if FEATURE_LEGACYNETCF
            if (CompatibilitySwitches.IsAppEarlierThanWindowsPhoneMango)
            {
                context = s_appDomainStaticContext;
            }
            else
#endif //FEATURE_LEGACYNETCF
            context = s_threadStaticContext;
#endif //FEATURE_CORECLR

#if FEATURE_APPX
            if (context == null && Environment.IsWinRTSupported)
            {
                context = GetWinRTContext();
            }
#endif

#if MONODROID
            if (context == null)
            {
                context = AndroidPlatform.GetDefaultSyncContext();
            }
#endif

            return(context);
        }
Esempio n. 2
0
        private static SynchronizationContext GetThreadLocalContext()
        {
            SynchronizationContext context = null;

#if FEATURE_APPX
            if (context == null && Environment.IsWinRTSupported)
            {
                context = GetWinRTContext();
            }
#endif

#if MONODROID
            if (context == null)
            {
                context = AndroidPlatform.GetDefaultSyncContext();
            }
#endif

            return(context);
        }