public static void DoAsync(Action func, Action onComplete = null, bool raiseException = false) { using (var async = new AsyncProcessor()) { if (func != null) { async.OnLoadContent += func; } if (onComplete != null) { async.OnLoadComplete += onComplete; } async.Run(); } }