RuntimeAddin[] GetDepAddins() { if (depAddins != null) { return(depAddins); } ArrayList plugList = new ArrayList(); string ns = ainfo.Description.Namespace; // Collect dependent ids foreach (Dependency dep in module.Dependencies) { AddinDependency pdep = dep as AddinDependency; if (pdep != null) { RuntimeAddin adn = addinEngine.GetAddin(Addin.GetFullId(ns, pdep.AddinId, pdep.Version)); if (adn != null) { plugList.Add(adn); } else { addinEngine.ReportError("Add-in dependency not loaded: " + pdep.FullAddinId, module.ParentAddinDescription.AddinId, null, false); } } } return(depAddins = (RuntimeAddin[])plugList.ToArray(typeof(RuntimeAddin))); }
public bool FindExtensionPathByType(IProgressStatus monitor, Type type, string nodeName, out string path, out string pathNodeName) { if (extensionPoint != null) { foreach (ExtensionNodeType nt in extensionPoint.NodeSet.NodeTypes) { if (nt.ObjectTypeName.Length > 0 && (nodeName.Length == 0 || nodeName == nt.Id)) { RuntimeAddin addin = addinEngine.GetAddin(extensionPoint.RootAddin); Type ot = addin.GetType(nt.ObjectTypeName); if (ot != null) { if (ot.IsAssignableFrom(type)) { path = extensionPoint.Path; pathNodeName = nt.Id; return(true); } } else { monitor.ReportError("Type '" + nt.ObjectTypeName + "' not found in add-in '" + Id + "'", null); } } } } else { foreach (TreeNode node in Children) { if (node.FindExtensionPathByType(monitor, type, nodeName, out path, out pathNodeName)) { return(true); } } } path = null; pathNodeName = null; return(false); }