private void LoadPlugin(string pluginInfo) { string[] parts = pluginInfo.Split(new char[] { ',' }); try { ObjectHandle handle = Activator.CreateInstance(parts[1].Trim(), parts[0].Trim()); if (handle != null) { IFinderExtender extender = handle.Unwrap() as IFinderExtender; if (extender != null) { extender.Initialize(host); finderExtenders.Add(extender); return; } } Trace.WriteLine("Could not load plugin:" + pluginInfo); } catch (Exception ex) { Trace.WriteLine("Could not load plugin:" + pluginInfo + "." + ex.ToString()); } }
public void AddPlugin(IFinderExtender extender) { this.finderExtenders.Add(extender); }