CodeOwls.PowerShell.Provider.Provider.GetHelpMaml C# (CSharp) Метод

GetHelpMaml() приватный Метод

private GetHelpMaml ( XmlDocument document, string key, string verb, string noun ) : string
document System.Xml.XmlDocument
key string
verb string
noun string
Результат string
        private string GetHelpMaml(XmlDocument document, string key, string verb, string noun)
        {
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(document.NameTable);
            nsmgr.AddNamespace("cmd", "http://schemas.microsoft.com/maml/dev/command/2004/10");

            string xpath = String.Format(
                "/helpItems/providerHelp/CmdletHelpPaths/CmdletHelpPath[@ID='{0}']/cmd:command[ ./cmd:details[ (cmd:verb='{1}') and (cmd:noun='{2}') ] ]",
                key,
                verb,
                noun);

            XmlNode node = null;
            try
            {
                node = document.SelectSingleNode(xpath, nsmgr);
            }
            catch (XPathException)
            {
                return string.Empty;
            }

            if (node == null)
            {
                return String.Empty;
            }

            return node.OuterXml;
        }

Same methods

Provider::GetHelpMaml ( string helpItemName, string path ) : string