public static ReadOnlyCollection <string> FindPluginAsGenericList(string pluginName) { List <string> namespaces = new List <string>(); try { HxRegistryWalkerClass registryWalker = new HxRegistryWalkerClass(); IHxRegNamespaceList help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); foreach (IHxRegNamespace currentNamespace in help2Namespaces) { IHxRegPlugInList p = (IHxRegPlugInList)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespacePlugInList); foreach (IHxRegPlugIn plugin in p) { string currentName = (string)plugin.GetProperty(HxRegPlugInPropId.HxRegPlugInName); if (string.Compare(currentName, pluginName) == 0) { namespaces.Add(currentNamespace.Name); break; } } } } catch (System.Runtime.InteropServices.COMException) { } ReadOnlyCollection <string> roNamespaces = new ReadOnlyCollection <string>(namespaces); return(roNamespaces); }
public static bool PluginDoesExist(string namespaceName, string pluginName) { if (string.IsNullOrEmpty(namespaceName) || string.IsNullOrEmpty(pluginName)) { return(false); } try { HxRegistryWalkerClass registryWalker = new HxRegistryWalkerClass(); IHxRegNamespaceList help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); foreach (IHxRegNamespace currentNamespace in help2Namespaces) { if (string.Compare(currentNamespace.Name, namespaceName) == 0) { IHxRegPlugInList p = (IHxRegPlugInList)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespacePlugInList); foreach (IHxRegPlugIn plugin in p) { string currentName = (string)plugin.GetProperty(HxRegPlugInPropId.HxRegPlugInName); if (string.Compare(currentName, pluginName) == 0) { return(true); } } } } } catch (System.Runtime.InteropServices.COMException) { } return(false); }
public static IList<string> FindPluginAsGenericList(string pluginName) { List<string> namespaces = new List<string>(); if (String.IsNullOrEmpty(pluginName)) { return namespaces; } try { HxRegistryWalkerClass registryWalker = new HxRegistryWalkerClass(); IHxRegNamespaceList help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); foreach (IHxRegNamespace currentNamespace in help2Namespaces) { IHxRegPlugInList p = (IHxRegPlugInList)currentNamespace.GetProperty( HxRegNamespacePropId.HxRegNamespacePlugInList); foreach (IHxRegPlugIn plugin in p) { string currentName = (string)plugin.GetProperty( HxRegPlugInPropId.HxRegPlugInName); if (String.Compare(currentName, pluginName) == 0) { namespaces.Add(currentNamespace.Name); break; } } } } catch (COMException) { } return namespaces.AsReadOnly(); }
public static bool PluginDoesExist(string namespaceName, string pluginName) { if (String.IsNullOrEmpty(namespaceName) || String.IsNullOrEmpty(pluginName)) { return false; } try { HxRegistryWalkerClass registryWalker = new HxRegistryWalkerClass(); IHxRegNamespaceList help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); foreach (IHxRegNamespace currentNamespace in help2Namespaces) { if (String.Equals(currentNamespace.Name, namespaceName)) { IHxRegPlugInList p = (IHxRegPlugInList)currentNamespace.GetProperty( HxRegNamespacePropId.HxRegNamespacePlugInList); foreach (IHxRegPlugIn plugin in p) { string currentName = (string)plugin.GetProperty( HxRegPlugInPropId.HxRegPlugInName); if (String.Equals(currentName, pluginName)) { return true; } } } } } catch (COMException) { } return false; }