internal override IEnumerable <HelpInfo> ProcessForwardedHelp(HelpInfo helpInfo, HelpRequest helpRequest)
 {
     System.Management.Automation.HelpCategory iteratorVariable0 = System.Management.Automation.HelpCategory.Workflow | System.Management.Automation.HelpCategory.ExternalScript | System.Management.Automation.HelpCategory.Filter | System.Management.Automation.HelpCategory.Function | System.Management.Automation.HelpCategory.ScriptCommand | System.Management.Automation.HelpCategory.Alias;
     if ((helpInfo.HelpCategory & iteratorVariable0) != System.Management.Automation.HelpCategory.None)
     {
         HelpRequest iteratorVariable1 = helpRequest.Clone();
         iteratorVariable1.Target        = helpInfo.ForwardTarget;
         iteratorVariable1.CommandOrigin = CommandOrigin.Internal;
         if ((helpInfo.ForwardHelpCategory != System.Management.Automation.HelpCategory.None) && (helpInfo.HelpCategory != System.Management.Automation.HelpCategory.Alias))
         {
             iteratorVariable1.HelpCategory = helpInfo.ForwardHelpCategory;
         }
         else
         {
             try
             {
                 CommandInfo commandInfo = this._context.CommandDiscovery.LookupCommandInfo(iteratorVariable1.Target);
                 iteratorVariable1.HelpCategory = commandInfo.HelpCategory;
             }
             catch (CommandNotFoundException)
             {
             }
         }
         IEnumerator <HelpInfo> enumerator = this.ExactMatchHelp(iteratorVariable1).GetEnumerator();
         while (enumerator.MoveNext())
         {
             HelpInfo current = enumerator.Current;
             yield return(current);
         }
     }
     else
     {
         yield return(helpInfo);
     }
 }
Example #2
0
 internal void Validate()
 {
     if (((string.IsNullOrEmpty(this._target) && (this._helpCategory == System.Management.Automation.HelpCategory.None)) && (string.IsNullOrEmpty(this._provider) && (this._component == null))) && ((this._role == null) && (this._functionality == null)))
     {
         this._target = "default";
         this._helpCategory = System.Management.Automation.HelpCategory.DefaultHelp;
     }
     else
     {
         if (string.IsNullOrEmpty(this._target))
         {
             if (!string.IsNullOrEmpty(this._provider) && ((this._helpCategory == System.Management.Automation.HelpCategory.None) || (this._helpCategory == System.Management.Automation.HelpCategory.Provider)))
             {
                 this._target = this._provider;
             }
             else
             {
                 this._target = "*";
             }
         }
         if ((((this._component != null) || (this._role != null)) || (this._functionality != null)) && (this._helpCategory == System.Management.Automation.HelpCategory.None))
         {
             this._helpCategory = System.Management.Automation.HelpCategory.Workflow | System.Management.Automation.HelpCategory.ExternalScript | System.Management.Automation.HelpCategory.Filter | System.Management.Automation.HelpCategory.Function | System.Management.Automation.HelpCategory.ScriptCommand | System.Management.Automation.HelpCategory.Cmdlet | System.Management.Automation.HelpCategory.Alias;
         }
         else
         {
             if ((this._helpCategory & System.Management.Automation.HelpCategory.Cmdlet) > System.Management.Automation.HelpCategory.None)
             {
                 this._helpCategory |= System.Management.Automation.HelpCategory.Alias;
             }
             if (this._helpCategory == System.Management.Automation.HelpCategory.None)
             {
                 this._helpCategory = System.Management.Automation.HelpCategory.All;
             }
             this._helpCategory &= ~System.Management.Automation.HelpCategory.DefaultHelp;
         }
     }
 }
Example #3
0
 internal void Validate()
 {
     if (((string.IsNullOrEmpty(this._target) && (this._helpCategory == System.Management.Automation.HelpCategory.None)) && (string.IsNullOrEmpty(this._provider) && (this._component == null))) && ((this._role == null) && (this._functionality == null)))
     {
         this._target       = "default";
         this._helpCategory = System.Management.Automation.HelpCategory.DefaultHelp;
     }
     else
     {
         if (string.IsNullOrEmpty(this._target))
         {
             if (!string.IsNullOrEmpty(this._provider) && ((this._helpCategory == System.Management.Automation.HelpCategory.None) || (this._helpCategory == System.Management.Automation.HelpCategory.Provider)))
             {
                 this._target = this._provider;
             }
             else
             {
                 this._target = "*";
             }
         }
         if ((((this._component != null) || (this._role != null)) || (this._functionality != null)) && (this._helpCategory == System.Management.Automation.HelpCategory.None))
         {
             this._helpCategory = System.Management.Automation.HelpCategory.Workflow | System.Management.Automation.HelpCategory.ExternalScript | System.Management.Automation.HelpCategory.Filter | System.Management.Automation.HelpCategory.Function | System.Management.Automation.HelpCategory.ScriptCommand | System.Management.Automation.HelpCategory.Cmdlet | System.Management.Automation.HelpCategory.Alias;
         }
         else
         {
             if ((this._helpCategory & System.Management.Automation.HelpCategory.Cmdlet) > System.Management.Automation.HelpCategory.None)
             {
                 this._helpCategory |= System.Management.Automation.HelpCategory.Alias;
             }
             if (this._helpCategory == System.Management.Automation.HelpCategory.None)
             {
                 this._helpCategory = System.Management.Automation.HelpCategory.All;
             }
             this._helpCategory &= ~System.Management.Automation.HelpCategory.DefaultHelp;
         }
     }
 }
Example #4
0
 internal HelpProviderInfo(string assemblyName, string className, System.Management.Automation.HelpCategory helpCategory)
 {
     this.AssemblyName = assemblyName;
     this.ClassName    = className;
     this.HelpCategory = helpCategory;
 }
        private HelpInfo GetFromCommandCache(string helpFileIdentifier, string commandName, System.Management.Automation.HelpCategory helpCategory)
        {
            string target = commandName;

            if (!string.IsNullOrEmpty(helpFileIdentifier))
            {
                target = helpFileIdentifier + @"\" + target;
            }
            HelpInfo cache = base.GetCache(target);

            if ((cache != null) && (cache.HelpCategory != helpCategory))
            {
                cache = ((MamlCommandHelpInfo)cache).Copy(helpCategory);
            }
            return(cache);
        }
Example #6
0
 internal HelpRequest(string target, System.Management.Automation.HelpCategory helpCategory)
 {
     this._target       = target;
     this._helpCategory = helpCategory;
     this._origin       = System.Management.Automation.CommandOrigin.Runspace;
 }
Example #7
0
 internal BaseCommandHelpInfo(System.Management.Automation.HelpCategory helpCategory)
 {
     this._helpCategory = helpCategory;
 }
Example #8
0
 internal HelpRequest(string target, System.Management.Automation.HelpCategory helpCategory)
 {
     this._target = target;
     this._helpCategory = helpCategory;
     this._origin = System.Management.Automation.CommandOrigin.Runspace;
 }
Example #9
0
 internal BaseCommandHelpInfo(System.Management.Automation.HelpCategory helpCategory)
 {
     this._helpCategory = helpCategory;
 }
Example #10
0
 internal HelpProviderInfo(string assemblyName, string className, System.Management.Automation.HelpCategory helpCategory)
 {
     this.AssemblyName = assemblyName;
     this.ClassName = className;
     this.HelpCategory = helpCategory;
 }