/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/System.Management.Automation/help/ScriptCommandHelpProvider.cs
81 строка
3 KB
Steve Lee
Update copyright notice to latest guidance (#12190)
24 мар 2020, 21:08
Не верифицирован
24 мар 2020, 21:08
b7cb335
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. namespace System.Management.Automation { /// <summary> /// Class ScriptCommandHelpProvider implement the help provider for Functions/ExternalScripts. /// This class does the same thing as CommandHelpProvider except for decision making: whether /// a particular command is Function/Script or not. /// </summary> /// <remarks> /// Command Help information are stored in 'help.xml' files. Location of these files /// can be found from through the engine execution context. /// </remarks> internal class ScriptCommandHelpProvider : CommandHelpProvider { /// <summary> /// Constructor for CommandHelpProvider. /// </summary> internal ScriptCommandHelpProvider(HelpSystem helpSystem) : base(helpSystem) { } #region Overrides /// <summary> /// Help category for this provider, which is a constant: HelpCategory.Command. /// </summary> /// <value>Help category for this provider</value> internal override HelpCategory HelpCategory { get { return HelpCategory.ExternalScript | HelpCategory.Filter | HelpCategory.Function | HelpCategory.Configuration | HelpCategory.ScriptCommand; } } /// <summary> /// Gets a command searcher used for ExactMatch help lookup. /// </summary> /// <param name="commandName"></param> /// <param name="context"></param> /// <returns></returns> internal override CommandSearcher GetCommandSearcherForExactMatch(string commandName, ExecutionContext context) { CommandSearcher searcher = new CommandSearcher( commandName, SearchResolutionOptions.None, CommandTypes.Filter | CommandTypes.Function | CommandTypes.ExternalScript | CommandTypes.Configuration, context); return searcher; } /// <summary> /// Gets a command searcher used for searching help. /// </summary> /// <param name="pattern"></param> /// <param name="context"></param> /// <returns></returns> internal override CommandSearcher GetCommandSearcherForSearch(string pattern, ExecutionContext context) { CommandSearcher searcher = new CommandSearcher( pattern, SearchResolutionOptions.CommandNameIsPattern | SearchResolutionOptions.ResolveFunctionPatterns, CommandTypes.Filter | CommandTypes.Function | CommandTypes.ExternalScript | CommandTypes.Configuration, context); return searcher; } #endregion } }