public static void ProgressChanged(PluginProgressChangedEventHandler del, IPlugin plugin, PluginProgressEventArgs args) { if (del == null) { return; } Delegate[] delegates = del.GetInvocationList(); if (AsynchronousProgressChanged) { AsyncCallback cleanUp = delegate(IAsyncResult asyncResult) { asyncResult.AsyncWaitHandle.Close(); }; foreach (PluginProgressChangedEventHandler sink in delegates) { sink.BeginInvoke(plugin, args, cleanUp, null); } } else { foreach (PluginProgressChangedEventHandler sink in delegates) { sink.Invoke(plugin, args); } } }
public static void ProgressChanged(PluginProgressChangedEventHandler del, IPlugin plugin, double value, double max) { ProgressChanged(del, plugin, new PluginProgressEventArgs(value, max)); }