Ejemplo n.º 1
0
        private List <string> GetCmdletHelpKeysForNodeFactory(INodeFactory nodeFactory)
        {
            var nodeFactoryType   = nodeFactory.GetType();
            var idsFromAttributes =
                from CmdletHelpPathIDAttribute attr in
                nodeFactoryType.GetCustomAttributes(typeof(CmdletHelpPathIDAttribute), true)
                select attr.ID;

            List <string> keys = new List <string>(idsFromAttributes);

            keys.AddRange(new[]
            {
                nodeFactoryType.FullName,
                nodeFactoryType.Name,
                nodeFactoryType.Name.Replace("NodeFactory", ""),
            });
            return(keys);
        }
Ejemplo n.º 2
0
        private List<string> GetCmdletHelpKeysForNodeFactory(INodeFactory nodeFactory)
        {
            var nodeFactoryType = nodeFactory.GetType();
            var idsFromAttributes =
                from CmdletHelpPathIDAttribute attr in
                    nodeFactoryType.GetCustomAttributes(typeof (CmdletHelpPathIDAttribute), true)
                select attr.ID;

            List<string> keys = new List<string>(idsFromAttributes);
            keys.AddRange(new[]
                              {
                                  nodeFactoryType.FullName,
                                  nodeFactoryType.Name,
                                  nodeFactoryType.Name.Replace("NodeFactory", ""),
                              });
            return keys;
        }