protected static void BeginInvokeWithErrorMessage(IServiceProvider serviceProvider, Dispatcher dispatcher, Action action) { dispatcher.BeginInvoke(new Action(() => CallWithErrorMessage(serviceProvider, action))); }