spelling: comments in src/System.Management.Automation/help
This commit is contained in:
parent
c59e992c25
commit
92a121a655
|
@ -126,14 +126,14 @@ namespace System.Management.Automation
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This will,
|
/// This will,
|
||||||
/// a. use _sessionState object to get a list of alias that match the target.
|
/// a. use _sessionState object to get a list of alias that match the target.
|
||||||
/// b. for each alias, retrive help info as in ExactMatchHelp.
|
/// b. for each alias, retrieve help info as in ExactMatchHelp.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="helpRequest">help request object</param>
|
/// <param name="helpRequest">help request object</param>
|
||||||
/// <param name="searchOnlyContent">
|
/// <param name="searchOnlyContent">
|
||||||
/// If true, searches for pattern in the help content. Individual
|
/// If true, searches for pattern in the help content. Individual
|
||||||
/// provider can decide which content to search in.
|
/// provider can decide which content to search in.
|
||||||
///
|
///
|
||||||
/// If false, seraches for pattern in the command names.
|
/// If false, searches for pattern in the command names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>a IEnumerable of helpinfo object</returns>
|
/// <returns>a IEnumerable of helpinfo object</returns>
|
||||||
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
||||||
|
|
|
@ -371,7 +371,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returs help information for a parameter(s) identified by pattern
|
/// Returns help information for a parameter(s) identified by pattern
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pattern">pattern to search for parameters</param>
|
/// <param name="pattern">pattern to search for parameters</param>
|
||||||
/// <returns>A collection of parameters that match pattern</returns>
|
/// <returns>A collection of parameters that match pattern</returns>
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace System.Management.Automation.Internal
|
||||||
|
|
||||||
#region IDisposable Interface
|
#region IDisposable Interface
|
||||||
//
|
//
|
||||||
// This is a special case of the IDisposable pattern becaue the resource
|
// This is a special case of the IDisposable pattern because the resource
|
||||||
// to be disposed is managed by the derived class. The implementation here
|
// to be disposed is managed by the derived class. The implementation here
|
||||||
// enables derived classes to handle it cleanly.
|
// enables derived classes to handle it cleanly.
|
||||||
//
|
//
|
||||||
|
|
|
@ -196,7 +196,7 @@ namespace System.Management.Automation.Internal
|
||||||
|
|
||||||
internal static class CabinetNativeApi
|
internal static class CabinetNativeApi
|
||||||
{
|
{
|
||||||
#region Delegates and function defintions
|
#region Delegates and function definitions
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
internal delegate IntPtr FdiAllocDelegate(int size);
|
internal delegate IntPtr FdiAllocDelegate(int size);
|
||||||
|
@ -617,7 +617,7 @@ namespace System.Management.Automation.Internal
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PInvoke Defintions
|
#region PInvoke Definitions
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an FDI context
|
/// Creates an FDI context
|
||||||
|
|
|
@ -261,7 +261,7 @@ namespace System.Management.Automation
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
{
|
{
|
||||||
helpFile = null;
|
helpFile = null;
|
||||||
// serachOnlyContent == true means get-help is looking into the content, in this case we dont
|
// searchOnlyContent == true means get-help is looking into the content, in this case we dont
|
||||||
// want to download the content from the remote machine. Reason: In Exchange scenario there
|
// want to download the content from the remote machine. Reason: In Exchange scenario there
|
||||||
// are ~700 proxy commands, downloading help for all the commands and searching in that
|
// are ~700 proxy commands, downloading help for all the commands and searching in that
|
||||||
// content takes a lot of time (in the order of 30 minutes) for their scenarios.
|
// content takes a lot of time (in the order of 30 minutes) for their scenarios.
|
||||||
|
@ -401,8 +401,8 @@ namespace System.Management.Automation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// ExactMatchHelp is overrided instead of DoExactMatchHelp to make sure
|
/// ExactMatchHelp is overridden instead of DoExactMatchHelp to make sure
|
||||||
/// all help item retrival will go through command discovery. Because each
|
/// all help item retrieval will go through command discovery. Because each
|
||||||
/// help file can contain multiple help items for different commands. Directly
|
/// help file can contain multiple help items for different commands. Directly
|
||||||
/// retrieve help cache can result in a invalid command to contain valid
|
/// retrieve help cache can result in a invalid command to contain valid
|
||||||
/// help item. Forcing each ExactMatchHelp to go through command discovery
|
/// help item. Forcing each ExactMatchHelp to go through command discovery
|
||||||
|
@ -591,7 +591,7 @@ namespace System.Management.Automation
|
||||||
if (String.IsNullOrEmpty(location))
|
if (String.IsNullOrEmpty(location))
|
||||||
{
|
{
|
||||||
// If the help file could not be found, then it is possible that the actual assembly name is something like
|
// If the help file could not be found, then it is possible that the actual assembly name is something like
|
||||||
// <Name>.ni.dll, e.g., MyAsembly.ni.dll, so let’s try to find the original help file in the cmdlet metadata.
|
// <Name>.ni.dll, e.g., MyAssembly.ni.dll, so let’s try to find the original help file in the cmdlet metadata.
|
||||||
location = GetHelpFile(helpFile, cmdletInfo);
|
location = GetHelpFile(helpFile, cmdletInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -794,14 +794,14 @@ namespace System.Management.Automation
|
||||||
HelpInfo result = GetFromCommandCache(helpFileIdentifier, commandInfo.Name, commandInfo.HelpCategory);
|
HelpInfo result = GetFromCommandCache(helpFileIdentifier, commandInfo.Name, commandInfo.HelpCategory);
|
||||||
if (null == result)
|
if (null == result)
|
||||||
{
|
{
|
||||||
// check if the command is prefixed and try retreiving help by removing the prefix
|
// check if the command is prefixed and try retrieving help by removing the prefix
|
||||||
if ((commandInfo.Module != null) && (!string.IsNullOrEmpty(commandInfo.Prefix)))
|
if ((commandInfo.Module != null) && (!string.IsNullOrEmpty(commandInfo.Prefix)))
|
||||||
{
|
{
|
||||||
MamlCommandHelpInfo newMamlHelpInfo = GetFromCommandCacheByRemovingPrefix(helpFileIdentifier, commandInfo);
|
MamlCommandHelpInfo newMamlHelpInfo = GetFromCommandCacheByRemovingPrefix(helpFileIdentifier, commandInfo);
|
||||||
if (null != newMamlHelpInfo)
|
if (null != newMamlHelpInfo)
|
||||||
{
|
{
|
||||||
// caching the changed help content under the prefixed name for faster
|
// caching the changed help content under the prefixed name for faster
|
||||||
// retreival later.
|
// retrieval later.
|
||||||
AddToCommandCache(helpFileIdentifier, commandInfo.Name, newMamlHelpInfo);
|
AddToCommandCache(helpFileIdentifier, commandInfo.Name, newMamlHelpInfo);
|
||||||
return newMamlHelpInfo;
|
return newMamlHelpInfo;
|
||||||
}
|
}
|
||||||
|
@ -824,7 +824,7 @@ namespace System.Management.Automation
|
||||||
HelpInfo result = GetFromCommandCache(cmdletInfo.ModuleName, cmdletInfo.Name, cmdletInfo.HelpCategory);
|
HelpInfo result = GetFromCommandCache(cmdletInfo.ModuleName, cmdletInfo.Name, cmdletInfo.HelpCategory);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
// check if the command is prefixed and try retreiving help by removing the prefix
|
// check if the command is prefixed and try retrieving help by removing the prefix
|
||||||
if ((cmdletInfo.Module != null) && (!string.IsNullOrEmpty(cmdletInfo.Prefix)))
|
if ((cmdletInfo.Module != null) && (!string.IsNullOrEmpty(cmdletInfo.Prefix)))
|
||||||
{
|
{
|
||||||
MamlCommandHelpInfo newMamlHelpInfo = GetFromCommandCacheByRemovingPrefix(cmdletInfo.ModuleName, cmdletInfo);
|
MamlCommandHelpInfo newMamlHelpInfo = GetFromCommandCacheByRemovingPrefix(cmdletInfo.ModuleName, cmdletInfo);
|
||||||
|
@ -845,7 +845,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
// caching the changed help content under the prefixed name for faster
|
// caching the changed help content under the prefixed name for faster
|
||||||
// retreival later.
|
// retrieval later.
|
||||||
AddToCommandCache(cmdletInfo.ModuleName, cmdletInfo.Name, newMamlHelpInfo);
|
AddToCommandCache(cmdletInfo.ModuleName, cmdletInfo.Name, newMamlHelpInfo);
|
||||||
return newMamlHelpInfo;
|
return newMamlHelpInfo;
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@ namespace System.Management.Automation
|
||||||
/// original command name (without prefix) as the key.
|
/// original command name (without prefix) as the key.
|
||||||
///
|
///
|
||||||
/// This method retrieves the help content by suppressing the prefix and then making a copy
|
/// This method retrieves the help content by suppressing the prefix and then making a copy
|
||||||
/// of the help contnet + change the name and then returns the copied help content.
|
/// of the help content + change the name and then returns the copied help content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="helpIdentifier"></param>
|
/// <param name="helpIdentifier"></param>
|
||||||
/// <param name="cmdInfo"></param>
|
/// <param name="cmdInfo"></param>
|
||||||
|
@ -882,7 +882,7 @@ namespace System.Management.Automation
|
||||||
if (null != originalHelpInfo)
|
if (null != originalHelpInfo)
|
||||||
{
|
{
|
||||||
result = originalHelpInfo.Copy();
|
result = originalHelpInfo.Copy();
|
||||||
// command's name can be changed using -Prefix while importing module.To give better user expereience for
|
// command's name can be changed using -Prefix while importing module.To give better user experience for
|
||||||
// get-help (on par with get-command), it was decided to use the prefixed command name
|
// get-help (on par with get-command), it was decided to use the prefixed command name
|
||||||
// for the help content.
|
// for the help content.
|
||||||
if (result.FullHelp.Properties["Name"] != null)
|
if (result.FullHelp.Properties["Name"] != null)
|
||||||
|
@ -982,7 +982,7 @@ namespace System.Management.Automation
|
||||||
/// <param name="helpRequest">help request object</param>
|
/// <param name="helpRequest">help request object</param>
|
||||||
/// <param name="searchOnlyContent">
|
/// <param name="searchOnlyContent">
|
||||||
/// If true, searches for pattern in the help content of all cmdlets.
|
/// If true, searches for pattern in the help content of all cmdlets.
|
||||||
/// Otherwise, seraches for pattern in the cmdlet names.
|
/// Otherwise, searches for pattern in the cmdlet names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
||||||
|
|
|
@ -235,7 +235,7 @@ namespace System.Management.Automation.Help
|
||||||
|
|
||||||
Collection<CommandParameterInfo> parameters = new Collection<CommandParameterInfo>();
|
Collection<CommandParameterInfo> parameters = new Collection<CommandParameterInfo>();
|
||||||
// GenerateParameters parameters in display order
|
// GenerateParameters parameters in display order
|
||||||
// ie., Postional followed by
|
// ie., Positional followed by
|
||||||
// Named Mandatory (in alpha numeric) followed by
|
// Named Mandatory (in alpha numeric) followed by
|
||||||
// Named (in alpha numeric)
|
// Named (in alpha numeric)
|
||||||
parameterSet.GenerateParametersInDisplayOrder(commonWorkflow,
|
parameterSet.GenerateParametersInDisplayOrder(commonWorkflow,
|
||||||
|
@ -256,7 +256,7 @@ namespace System.Management.Automation.Help
|
||||||
/// <param name="obj">HelpInfo object</param>
|
/// <param name="obj">HelpInfo object</param>
|
||||||
/// <param name="parameters">
|
/// <param name="parameters">
|
||||||
/// a collection of parameters in display order
|
/// a collection of parameters in display order
|
||||||
/// ie., Postional followed by
|
/// ie., Positional followed by
|
||||||
/// Named Mandatory (in alpha numeric) followed by
|
/// Named Mandatory (in alpha numeric) followed by
|
||||||
/// Named (in alpha numeric)
|
/// Named (in alpha numeric)
|
||||||
/// </param>
|
/// </param>
|
||||||
|
|
|
@ -201,7 +201,7 @@ namespace Microsoft.PowerShell.Commands
|
||||||
|
|
||||||
private bool _showWindow;
|
private bool _showWindow;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets and sets a value indicatuing whether the help should be displayed in a separate window
|
/// Gets and sets a value indicating whether the help should be displayed in a separate window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter(ParameterSetName = "ShowWindow", Mandatory = true)]
|
[Parameter(ParameterSetName = "ShowWindow", Mandatory = true)]
|
||||||
public SwitchParameter ShowWindow
|
public SwitchParameter ShowWindow
|
||||||
|
@ -397,7 +397,7 @@ namespace Microsoft.PowerShell.Commands
|
||||||
/// Change <paramref name="originalHelpObject"/> as per user request.
|
/// Change <paramref name="originalHelpObject"/> as per user request.
|
||||||
///
|
///
|
||||||
/// This method creates a new type to the existing typenames
|
/// This method creates a new type to the existing typenames
|
||||||
/// depending on Detailed,Full,Example parameteres and adds this
|
/// depending on Detailed,Full,Example parameters and adds this
|
||||||
/// new type(s) to the top of the list.
|
/// new type(s) to the top of the list.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="originalHelpObject">Full help object to transform.</param>
|
/// <param name="originalHelpObject">Full help object to transform.</param>
|
||||||
|
@ -456,7 +456,7 @@ namespace Microsoft.PowerShell.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the paramater info for patterns identified Parameter property.
|
/// Gets the parameter info for patterns identified Parameter property.
|
||||||
/// Writes the parameter info(s) to the output stream. An error is thrown
|
/// Writes the parameter info(s) to the output stream. An error is thrown
|
||||||
/// if a parameter with a given pattern is not found.
|
/// if a parameter with a given pattern is not found.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1140,7 +1140,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
// comment block is behind function definition
|
// comment block is behind function definition
|
||||||
// we don't suport it for configuration delaration as this style is rarely used
|
// we don't support it for configuration declaration as this style is rarely used
|
||||||
if (funcDefnAst != null)
|
if (funcDefnAst != null)
|
||||||
{
|
{
|
||||||
startTokenIndex =
|
startTokenIndex =
|
||||||
|
|
|
@ -44,10 +44,10 @@ namespace System.Management.Automation
|
||||||
/// TraceFrame instance exists in a scope governed by using statement. It is possible
|
/// TraceFrame instance exists in a scope governed by using statement. It is possible
|
||||||
/// that a new TraceFrame instance will be created in the scope of another TraceFrame
|
/// that a new TraceFrame instance will be created in the scope of another TraceFrame
|
||||||
/// instance. The scopes of various live TraceFrame instances form a stack which is
|
/// instance. The scopes of various live TraceFrame instances form a stack which is
|
||||||
/// similiar to call stacks of normal C# functions. This is why we call this class
|
/// similar to call stacks of normal C# functions. This is why we call this class
|
||||||
/// a "TraceFrame"
|
/// a "TraceFrame"
|
||||||
///
|
///
|
||||||
/// TraceFrame itself implements IDisposable interface to guarrentee a chance to
|
/// TraceFrame itself implements IDisposable interface to guarantee a chance to
|
||||||
/// write errors into system error pool when execution gets out of its scope. During
|
/// write errors into system error pool when execution gets out of its scope. During
|
||||||
/// disposal time, errorRecords accumulated will be written to system error pool
|
/// disposal time, errorRecords accumulated will be written to system error pool
|
||||||
/// together with error context information collected at instance creation.
|
/// together with error context information collected at instance creation.
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace System.Management.Automation
|
||||||
/// Constructor for HelpFileHelpInfo
|
/// Constructor for HelpFileHelpInfo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This is made private intentally so that the only way to create object of this type
|
/// This is made private intentionally so that the only way to create object of this type
|
||||||
/// is through
|
/// is through
|
||||||
/// GetHelpInfo(string name, string text, string filename)
|
/// GetHelpInfo(string name, string text, string filename)
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace System.Management.Automation
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Target object in forward-help-provider that should process this HelpInfo.
|
/// Target object in forward-help-provider that should process this HelpInfo.
|
||||||
/// This will serve as auxilliary information to be passed to forward help provider.
|
/// This will serve as auxiliary information to be passed to forward help provider.
|
||||||
///
|
///
|
||||||
/// In the case of AliasHelpInfo, for example, it needs to be forwarded to
|
/// In the case of AliasHelpInfo, for example, it needs to be forwarded to
|
||||||
/// CommandHelpProvider to fill in detailed helpInfo. In that case, ForwardHelpCategory
|
/// CommandHelpProvider to fill in detailed helpInfo. In that case, ForwardHelpCategory
|
||||||
|
@ -140,7 +140,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returs help information for a parameter(s) identified by pattern
|
/// Returns help information for a parameter(s) identified by pattern
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pattern">pattern to search for parameters</param>
|
/// <param name="pattern">pattern to search for parameters</param>
|
||||||
/// <returns>A collection of parameters that match pattern</returns>
|
/// <returns>A collection of parameters that match pattern</returns>
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace System.Management.Automation
|
||||||
/// Retrieve help info that exactly match the target.
|
/// Retrieve help info that exactly match the target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="helpRequest">help request object</param>
|
/// <param name="helpRequest">help request object</param>
|
||||||
/// <returns>List of HelpInfo objects retrived</returns>
|
/// <returns>List of HelpInfo objects retrieved</returns>
|
||||||
internal abstract IEnumerable<HelpInfo> ExactMatchHelp(HelpRequest helpRequest);
|
internal abstract IEnumerable<HelpInfo> ExactMatchHelp(HelpRequest helpRequest);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -154,7 +154,7 @@ namespace System.Management.Automation
|
||||||
/// If true, searches for pattern in the help content. Individual
|
/// If true, searches for pattern in the help content. Individual
|
||||||
/// provider can decide which content to search in.
|
/// provider can decide which content to search in.
|
||||||
///
|
///
|
||||||
/// If false, seraches for pattern in the command names.
|
/// If false, searches for pattern in the command names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>a collection of help info objects</returns>
|
/// <returns>a collection of help info objects</returns>
|
||||||
internal abstract IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent);
|
internal abstract IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent);
|
||||||
|
|
|
@ -93,8 +93,8 @@ namespace System.Management.Automation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Derived class can choose to either override ExactMatchHelp method to DoExactMatchHelp method.
|
/// Derived class can choose to either override ExactMatchHelp method to DoExactMatchHelp method.
|
||||||
/// If ExactMatchHelp is overriden, initial cache checking will be disabled by default.
|
/// If ExactMatchHelp is overridden, initial cache checking will be disabled by default.
|
||||||
/// If DoExactMatchHelp is overriden, cache check will be done first in ExactMatchHelp before the
|
/// If DoExactMatchHelp is overridden, cache check will be done first in ExactMatchHelp before the
|
||||||
/// logic in DoExactMatchHelp is in place.
|
/// logic in DoExactMatchHelp is in place.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="helpRequest">help request object</param>
|
/// <param name="helpRequest">help request object</param>
|
||||||
|
@ -110,7 +110,7 @@ namespace System.Management.Automation
|
||||||
/// If true, searches for pattern in the help content. Individual
|
/// If true, searches for pattern in the help content. Individual
|
||||||
/// provider can decide which content to search in.
|
/// provider can decide which content to search in.
|
||||||
///
|
///
|
||||||
/// If false, seraches for pattern in the command names.
|
/// If false, searches for pattern in the command names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>a collection of help info objects</returns>
|
/// <returns>a collection of help info objects</returns>
|
||||||
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace System.Management.Automation
|
||||||
/// If true, searches for pattern in the help content. Individual
|
/// If true, searches for pattern in the help content. Individual
|
||||||
/// provider can decide which content to search in.
|
/// provider can decide which content to search in.
|
||||||
///
|
///
|
||||||
/// If false, seraches for pattern in the command names.
|
/// If false, searches for pattern in the command names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>a collection of help info objects</returns>
|
/// <returns>a collection of help info objects</returns>
|
||||||
internal sealed override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
internal sealed override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace System.Management.Automation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Monad help is an architecture made up of three layers:
|
/// Monad help is an architecture made up of three layers:
|
||||||
/// 1. At the top is get-help commandlet from where help functionality is accessed.
|
/// 1. At the top is get-help commandlet from where help functionality is accessed.
|
||||||
/// 2. At the middel is the help system which collects help objects based on user's request.
|
/// 2. At the middle is the help system which collects help objects based on user's request.
|
||||||
/// 3. At the bottom are different help providers which provide help contents for different kinds of information requested.
|
/// 3. At the bottom are different help providers which provide help contents for different kinds of information requested.
|
||||||
///
|
///
|
||||||
/// Class HelpSystem implements the middle layer of Monad Help.
|
/// Class HelpSystem implements the middle layer of Monad Help.
|
||||||
|
@ -48,7 +48,7 @@ namespace System.Management.Automation
|
||||||
/// Help Api:
|
/// Help Api:
|
||||||
/// Help Api is the function to be called by get-help commandlet.
|
/// Help Api is the function to be called by get-help commandlet.
|
||||||
///
|
///
|
||||||
/// Following information needs to be provided in Help Api paramters,
|
/// Following information needs to be provided in Help Api parameters,
|
||||||
/// 1. search target: (which can be one or multiple strings)
|
/// 1. search target: (which can be one or multiple strings)
|
||||||
/// 2. help type: limit the type of help to be searched.
|
/// 2. help type: limit the type of help to be searched.
|
||||||
/// 3. included fields: the fields to be included in the help info
|
/// 3. included fields: the fields to be included in the help info
|
||||||
|
@ -145,7 +145,7 @@ namespace System.Management.Automation
|
||||||
InitializeHelpProviders();
|
InitializeHelpProviders();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Initalization
|
#endregion Initialization
|
||||||
|
|
||||||
#region Help API
|
#region Help API
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ namespace System.Management.Automation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get help based on the target, help type, etc
|
/// Get help based on the target, help type, etc
|
||||||
///
|
///
|
||||||
/// Help eninge retrieve help based on following schemes,
|
/// Help engine retrieve help based on following schemes,
|
||||||
///
|
///
|
||||||
/// 1. if help target is empty, get default help
|
/// 1. if help target is empty, get default help
|
||||||
/// 2. if help target is not a search pattern, try to retrieve exact help
|
/// 2. if help target is not a search pattern, try to retrieve exact help
|
||||||
|
@ -411,7 +411,7 @@ namespace System.Management.Automation
|
||||||
/// <param name="helpInfo"></param>
|
/// <param name="helpInfo"></param>
|
||||||
/// <param name="helpRequest">Help request object</param>
|
/// <param name="helpRequest">Help request object</param>
|
||||||
/// <returns>Never returns null.</returns>
|
/// <returns>Never returns null.</returns>
|
||||||
/// <remarks>helpInfos is not null or emtpy.</remarks>
|
/// <remarks>helpInfos is not null or empty.</remarks>
|
||||||
private IEnumerable<HelpInfo> ForwardHelp(HelpInfo helpInfo, HelpRequest helpRequest)
|
private IEnumerable<HelpInfo> ForwardHelp(HelpInfo helpInfo, HelpRequest helpRequest)
|
||||||
{
|
{
|
||||||
Collection<HelpInfo> result = new Collection<HelpInfo>();
|
Collection<HelpInfo> result = new Collection<HelpInfo>();
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace System.Management.Automation
|
||||||
/// 1. a file name
|
/// 1. a file name
|
||||||
/// 2. a search pattern
|
/// 2. a search pattern
|
||||||
/// It can also include a path, in that case,
|
/// It can also include a path, in that case,
|
||||||
/// 1. the path will be searched first for the existense of the files.
|
/// 1. the path will be searched first for the existence of the files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal string Target { get; } = null;
|
internal string Target { get; } = null;
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ namespace System.Management.Automation
|
||||||
// particular component, role and functionality using parameters like
|
// particular component, role and functionality using parameters like
|
||||||
// -component, -role, -functionality.
|
// -component, -role, -functionality.
|
||||||
// 3. At runtime, help engine will match against component/role/functionality
|
// 3. At runtime, help engine will match against component/role/functionality
|
||||||
// criteria before returing help results.
|
// criteria before returning help results.
|
||||||
//
|
//
|
||||||
|
|
||||||
private string _component = null;
|
private string _component = null;
|
||||||
|
@ -276,7 +276,7 @@ namespace System.Management.Automation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Merge the provider specific help with current command help.
|
/// Merge the provider specific help with current command help.
|
||||||
///
|
///
|
||||||
/// The cmdletHelp and dynamicParameterHelp is normally retrived from ProviderHelpProvider.
|
/// The cmdletHelp and dynamicParameterHelp is normally retrieved from ProviderHelpProvider.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// A new MamlCommandHelpInfo is created to avoid polluting the provider help cache.
|
/// A new MamlCommandHelpInfo is created to avoid polluting the provider help cache.
|
||||||
|
@ -292,7 +292,7 @@ namespace System.Management.Automation
|
||||||
MamlCommandHelpInfo result = (MamlCommandHelpInfo)this.MemberwiseClone();
|
MamlCommandHelpInfo result = (MamlCommandHelpInfo)this.MemberwiseClone();
|
||||||
|
|
||||||
// We will need to use a deep clone of _fullHelpObject
|
// We will need to use a deep clone of _fullHelpObject
|
||||||
// to avoid _fullHelpObject being get tarminated.
|
// to avoid _fullHelpObject being get terminated.
|
||||||
result._fullHelpObject = this._fullHelpObject.Copy();
|
result._fullHelpObject = this._fullHelpObject.Copy();
|
||||||
|
|
||||||
if (cmdletHelp != null)
|
if (cmdletHelp != null)
|
||||||
|
@ -333,7 +333,7 @@ namespace System.Management.Automation
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Given a PSObject, this method will traverse through the objects properties,
|
/// Given a PSObject, this method will traverse through the objects properties,
|
||||||
/// extracts content from properities that are of type System.String, appends them
|
/// extracts content from properties that are of type System.String, appends them
|
||||||
/// together and returns.
|
/// together and returns.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="psObject"></param>
|
/// <param name="psObject"></param>
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace System.Management.Automation
|
||||||
/// etc, which needs to be taken care of during display. As a result, xml node in Maml schema can't be
|
/// etc, which needs to be taken care of during display. As a result, xml node in Maml schema can't be
|
||||||
/// converted into PSObject directly with XmlNodeAdapter.
|
/// converted into PSObject directly with XmlNodeAdapter.
|
||||||
///
|
///
|
||||||
/// MamlNode class provides logic in converting formatting tags into the format accetable by monad format
|
/// MamlNode class provides logic in converting formatting tags into the format acceptable by monad format
|
||||||
/// and output engine.
|
/// and output engine.
|
||||||
///
|
///
|
||||||
/// Following three kinds of formating tags are supported per our agreement with Maml team,
|
/// Following three kinds of formating tags are supported per our agreement with Maml team,
|
||||||
|
@ -61,10 +61,10 @@ namespace System.Management.Automation
|
||||||
/// <tag>*</tag>
|
/// <tag>*</tag>
|
||||||
/// <text>text for list item 2</text>
|
/// <text>text for list item 2</text>
|
||||||
/// </textItem>
|
/// </textItem>
|
||||||
/// 3. definitionList => a list of defintionTextItem's
|
/// 3. definitionList => a list of definitionTextItem's
|
||||||
/// <definitionListItem>
|
/// <definitionListItem>
|
||||||
/// <term>definition term here</term>
|
/// <term>definition term here</term>
|
||||||
/// <definition>defintion text here</definition>
|
/// <definition>definition text here</definition>
|
||||||
/// </definitionListItem>
|
/// </definitionListItem>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
|
@ -380,7 +380,7 @@ namespace System.Management.Automation
|
||||||
/// "attrib1" will be lost. This seems to be OK with current practice of authoring
|
/// "attrib1" will be lost. This seems to be OK with current practice of authoring
|
||||||
/// monad command help.
|
/// monad command help.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="properties">property hastable</param>
|
/// <param name="properties">property hashtable</param>
|
||||||
/// <param name="name">property name</param>
|
/// <param name="name">property name</param>
|
||||||
/// <param name="mshObject">property value</param>
|
/// <param name="mshObject">property value</param>
|
||||||
private static void AddProperty(Hashtable properties, string name, PSObject mshObject)
|
private static void AddProperty(Hashtable properties, string name, PSObject mshObject)
|
||||||
|
@ -805,7 +805,7 @@ namespace System.Management.Automation
|
||||||
/// two properties,
|
/// two properties,
|
||||||
/// a. tag=" 1. " or " 2. "
|
/// a. tag=" 1. " or " 2. "
|
||||||
/// b. text="text for list item 1" or "text for list item 2"
|
/// b. text="text for list item 1" or "text for list item 2"
|
||||||
/// In the case of unordered list, similiar PSObject will created with type to be "MamlUnorderedListText" and tag="*"
|
/// In the case of unordered list, similar PSObject will created with type to be "MamlUnorderedListText" and tag="*"
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="xmlNode"></param>
|
/// <param name="xmlNode"></param>
|
||||||
|
@ -977,16 +977,16 @@ namespace System.Management.Automation
|
||||||
/// Convert an definitionListItem node into an PSObject
|
/// Convert an definitionListItem node into an PSObject
|
||||||
///
|
///
|
||||||
/// For example
|
/// For example
|
||||||
/// <defintionListItem>
|
/// <definitionListItem>
|
||||||
/// <term>
|
/// <term>
|
||||||
/// term text
|
/// term text
|
||||||
/// </term>
|
/// </term>
|
||||||
/// <definition>
|
/// <definition>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// definiton text
|
/// definition text
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </definition>
|
/// </definition>
|
||||||
/// </defintionListItem>
|
/// </definitionListItem>
|
||||||
/// In this case, an PSObject of type "definitionListText" will be created with following
|
/// In this case, an PSObject of type "definitionListText" will be created with following
|
||||||
/// properties
|
/// properties
|
||||||
/// a. term="term text"
|
/// a. term="term text"
|
||||||
|
@ -1185,7 +1185,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get mininum indentation of a paragraph
|
/// Get minimum indentation of a paragraph
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lines"></param>
|
/// <param name="lines"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -1208,7 +1208,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get indetation of a line, i.e., number of spaces
|
/// Get indentation of a line, i.e., number of spaces
|
||||||
/// at the beginning of the line.
|
/// at the beginning of the line.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="line"></param>
|
/// <param name="line"></param>
|
||||||
|
|
|
@ -188,7 +188,7 @@ namespace System.Management.Automation
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get propery info.
|
/// Get property info.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static PSPropertyInfo GetProperyInfo(PSObject psObject, string[] path)
|
internal static PSPropertyInfo GetProperyInfo(PSObject psObject, string[] path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,7 +126,7 @@ namespace System.Management.Automation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the help in for the PS Class Info. ///
|
/// Get the help in for the PS Class Info. ///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="searcher">Searcher for PS Classses.</param>
|
/// <param name="searcher">Searcher for PS Classes.</param>
|
||||||
/// <returns>Next HelpInfo object.</returns>
|
/// <returns>Next HelpInfo object.</returns>
|
||||||
private IEnumerable<HelpInfo> GetHelpInfo(PSClassSearcher searcher)
|
private IEnumerable<HelpInfo> GetHelpInfo(PSClassSearcher searcher)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,7 +112,7 @@ namespace System.Management.Automation
|
||||||
throw new ItemNotFoundException(_requestedPath, "PathNotFound", SessionStateStrings.PathNotFound);
|
throw new ItemNotFoundException(_requestedPath, "PathNotFound", SessionStateStrings.PathNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ok we have path and valid provider that supplys content..intialize the provider
|
// ok we have path and valid provider that supplys content..initialize the provider
|
||||||
// and get the help content for the path.
|
// and get the help content for the path.
|
||||||
cmdletProvider.Start(providerInfo, cmdletProviderContext);
|
cmdletProvider.Start(providerInfo, cmdletProviderContext);
|
||||||
// There should be exactly one resolved path.
|
// There should be exactly one resolved path.
|
||||||
|
|
|
@ -263,7 +263,7 @@ namespace System.Management.Automation
|
||||||
private Hashtable _dynamicParameterHelps;
|
private Hashtable _dynamicParameterHelps;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the provider-specific dynamic paramter help based on input parameter name
|
/// Return the provider-specific dynamic parameter help based on input parameter name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parameters">an array of parameters to retrieve help</param>
|
/// <param name="parameters">an array of parameters to retrieve help</param>
|
||||||
/// <returns>an array of mshObject that contains the parameter help</returns>
|
/// <returns>an array of mshObject that contains the parameter help</returns>
|
||||||
|
|
|
@ -264,7 +264,7 @@ namespace System.Management.Automation
|
||||||
/// If true, searches for pattern in the help content. Individual
|
/// If true, searches for pattern in the help content. Individual
|
||||||
/// provider can decide which content to search in.
|
/// provider can decide which content to search in.
|
||||||
///
|
///
|
||||||
/// If false, seraches for pattern in the command names.
|
/// If false, searches for pattern in the command names.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
internal override IEnumerable<HelpInfo> SearchHelp(HelpRequest helpRequest, bool searchOnlyContent)
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace System.Management.Automation
|
||||||
_deserializedRemoteHelp = helpResults[0];
|
_deserializedRemoteHelp = helpResults[0];
|
||||||
_deserializedRemoteHelp.Methods.Remove("ToString");
|
_deserializedRemoteHelp.Methods.Remove("ToString");
|
||||||
// Win8: bug9457: Remote proxy command's name can be changed locally using -Prefix
|
// Win8: bug9457: Remote proxy command's name can be changed locally using -Prefix
|
||||||
// parameter of the Import-PSSession cmdlet. To give better user expereience for
|
// parameter of the Import-PSSession cmdlet. To give better user experience for
|
||||||
// get-help (on par with get-command), it was decided to use the local command name
|
// get-help (on par with get-command), it was decided to use the local command name
|
||||||
// for the help content.
|
// for the help content.
|
||||||
PSPropertyInfo nameInfo = _deserializedRemoteHelp.Properties["Name"];
|
PSPropertyInfo nameInfo = _deserializedRemoteHelp.Properties["Name"];
|
||||||
|
|
|
@ -16,7 +16,7 @@ using System.Diagnostics;
|
||||||
namespace Microsoft.PowerShell.Commands
|
namespace Microsoft.PowerShell.Commands
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class implements the Save-Help cmdleto
|
/// This class implements the Save-Help cmdlet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Cmdlet(VerbsData.Save, "Help", DefaultParameterSetName = SaveHelpCommand.PathParameterSetName,
|
[Cmdlet(VerbsData.Save, "Help", DefaultParameterSetName = SaveHelpCommand.PathParameterSetName,
|
||||||
HelpUri = "http://go.microsoft.com/fwlink/?LinkID=210612")]
|
HelpUri = "http://go.microsoft.com/fwlink/?LinkID=210612")]
|
||||||
|
|
|
@ -799,7 +799,7 @@ namespace Microsoft.PowerShell.Commands
|
||||||
#region Logging
|
#region Logging
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loggs a command message
|
/// Logs a command message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message">message to log</param>
|
/// <param name="message">message to log</param>
|
||||||
internal void LogMessage(string message)
|
internal void LogMessage(string message)
|
||||||
|
|
|
@ -869,7 +869,7 @@ namespace System.Management.Automation.Help
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Downloads the help cotent
|
/// Downloads the help content
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="commandType">command type</param>
|
/// <param name="commandType">command type</param>
|
||||||
/// <param name="path">destination path</param>
|
/// <param name="path">destination path</param>
|
||||||
|
@ -1267,7 +1267,7 @@ namespace System.Management.Automation.Help
|
||||||
|
|
||||||
string cabDir = Path.GetDirectoryName(srcPath);
|
string cabDir = Path.GetDirectoryName(srcPath);
|
||||||
|
|
||||||
// Cabinet API doens't handle the trailing back slash
|
// Cabinet API doesn't handle the trailing back slash
|
||||||
if (!cabDir.EndsWith("\\", StringComparison.Ordinal))
|
if (!cabDir.EndsWith("\\", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
cabDir += "\\";
|
cabDir += "\\";
|
||||||
|
|
Loading…
Reference in a new issue