public static void InvokeAsync<TParam, TResult>(Func<TParam, TResult> function, TParam parameter, Action<TResult> completedAction) { BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += (sender, e) => e.Result = function(parameter); bw.RunWorkerCompleted += (sender, e) => completedAction((TResult)e.Result); bw.RunWorkerAsync(); }
function
InvokeAsync
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)