예제 #1
0
 /// <summary>
 /// Should be called from OnActivated and OnLaunched
 /// </summary>
 private void RegisterExceptionHandlingSynchronizationContext()
 {
     ExceptionHandlingSynchronizationContext
     .Register()
     .UnhandledException += SynchronizationContext_UnhandledException;
 }
예제 #2
0
        private void EnsureSyncContext()
        {
            var exceptionHandlingSynchronizationContext = ExceptionHandlingSynchronizationContext.Register();

            exceptionHandlingSynchronizationContext.UnhandledException += OnSynchronizationContextUnhandledException;
        }