public void RunInSta(Action userDelegate)
{
lastException = null;
var thread = new Thread(() => MultiThreadedWorker(() => userDelegate()));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
if (lastException != null)
{
ThrowExceptionPreservingStack(lastException);
}
}