public static void Initialize(OptionsPage optionsPage) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(GlobalExceptionHandlerEvent); DTE = (DTE2)TidyCSharpPackage.GetGlobalService(typeof(SDTE)); Settings = new GlobalSettings(); Settings.Load(); OptionsPage = optionsPage; }
public static void Initialize(OptionsPage optionsPage) { ThreadHelper.JoinableTaskFactory .Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); }); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(GlobalExceptionHandlerEvent); Dte = (DTE2)TidyCSharpPackage.GetGlobalService(typeof(SDTE)); Settings = new GlobalSettings(); Settings.Load(); }