private void ClientPluginUnloading(PluginEventArgs e) { var pluginViewModel = Plugins.FirstOrDefault(pvm => pvm.PluginName == e.PluginName); if (pluginViewModel != null) { Plugins.Remove(pluginViewModel); pluginViewModel.Dispose(); } }
private void ClientPluginUnloading(object sender, PluginEventArgs e) { Dispatcher.BeginInvoke(new Action<PluginEventArgs>(args => { var pluginViewModel = Plugins.FirstOrDefault(pvm => pvm.PluginName == e.PluginName); if (pluginViewModel != null) { Plugins.Remove(pluginViewModel); pluginViewModel.Dispose(); } }), e); }
private void ClientPluginLoaded(PluginEventArgs e) { Plugins.Add(new PluginViewModel(e.PluginName)); }
private void ClientPluginLoaded(object sender, PluginEventArgs e) { Dispatcher.BeginInvoke(new Action<PluginEventArgs>(args => { Plugins.Add(new PluginViewModel(args.PluginName)); }), e); }