mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
spelling: locals in src/System.Management.Automation/help
This commit is contained in:
@@ -717,7 +717,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
UserDefinedHelpData userDefinedHelpData = UserDefinedHelpData.Load(node);
|
||||
|
||||
ProcessUserDefineddHelpData(helpFileIdentifier, userDefinedHelpData);
|
||||
ProcessUserDefinedHelpData(helpFileIdentifier, userDefinedHelpData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -730,7 +730,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <param name="mshSnapInId">PSSnapIn Name for the current help file.</param>
|
||||
/// <param name="userDefinedHelpData"></param>
|
||||
private void ProcessUserDefineddHelpData(string mshSnapInId, UserDefinedHelpData userDefinedHelpData)
|
||||
private void ProcessUserDefinedHelpData(string mshSnapInId, UserDefinedHelpData userDefinedHelpData)
|
||||
{
|
||||
if (userDefinedHelpData == null)
|
||||
return;
|
||||
|
||||
@@ -135,11 +135,11 @@ namespace System.Management.Automation
|
||||
else
|
||||
{
|
||||
int countOfHelpInfoObjectsFound = 0;
|
||||
WildcardPattern helpMatchter = WildcardPattern.Get(wildcardpattern, WildcardOptions.IgnoreCase);
|
||||
WildcardPattern helpMatcher = WildcardPattern.Get(wildcardpattern, WildcardOptions.IgnoreCase);
|
||||
foreach (string key in _helpCache.Keys)
|
||||
{
|
||||
if ((!searchOnlyContent && helpMatchter.IsMatch(key)) ||
|
||||
(searchOnlyContent && ((HelpInfo)_helpCache[key]).MatchPatternInContent(helpMatchter)))
|
||||
if ((!searchOnlyContent && helpMatcher.IsMatch(key)) ||
|
||||
(searchOnlyContent && ((HelpInfo)_helpCache[key]).MatchPatternInContent(helpMatcher)))
|
||||
{
|
||||
countOfHelpInfoObjectsFound++;
|
||||
yield return (HelpInfo)_helpCache[key];
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace System.Management.Automation
|
||||
// Add maml2 first since we are prepending.
|
||||
|
||||
// For maml2: Add as collection or single item. No-op if
|
||||
PSPropertyInfo propertyInfo2 = GetProperyInfo(maml2, parametersPath);
|
||||
PSPropertyInfo propertyInfo2 = GetPropertyInfo(maml2, parametersPath);
|
||||
var array = propertyInfo2.Value as Array;
|
||||
if (array != null)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ namespace System.Management.Automation
|
||||
// Extend maml1 to make sure the property-path exists - since we'll be modifying it soon.
|
||||
EnsurePropertyInfoPathExists(maml1, parametersPath);
|
||||
// For maml1: Add as collection or single item. Do nothing if null or some other type.
|
||||
PSPropertyInfo propertyInfo1 = GetProperyInfo(maml1, parametersPath);
|
||||
PSPropertyInfo propertyInfo1 = GetPropertyInfo(maml1, parametersPath);
|
||||
List<object> maml1items = new List<object>();
|
||||
array = propertyInfo1.Value as Array;
|
||||
if (array != null)
|
||||
@@ -190,7 +190,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Get property info.
|
||||
/// </summary>
|
||||
internal static PSPropertyInfo GetProperyInfo(PSObject psObject, string[] path)
|
||||
internal static PSPropertyInfo GetPropertyInfo(PSObject psObject, string[] path)
|
||||
{
|
||||
if (path.Length <= 0)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ namespace System.Management.Automation
|
||||
// Add maml2 first since we are prepending.
|
||||
|
||||
// For maml2: Add as collection or single item. No-op if
|
||||
PSPropertyInfo propertyInfo2 = GetProperyInfo(maml2, path);
|
||||
PSPropertyInfo propertyInfo2 = GetPropertyInfo(maml2, path);
|
||||
|
||||
if (null != propertyInfo2)
|
||||
{
|
||||
@@ -256,7 +256,7 @@ namespace System.Management.Automation
|
||||
// Extend maml1 to make sure the property-path exists - since we'll be modifying it soon.
|
||||
EnsurePropertyInfoPathExists(maml1, path);
|
||||
// For maml1: Add as collection or single item. Do nothing if null or some other type.
|
||||
PSPropertyInfo propertyInfo1 = GetProperyInfo(maml1, path);
|
||||
PSPropertyInfo propertyInfo1 = GetPropertyInfo(maml1, path);
|
||||
|
||||
if (null != propertyInfo1)
|
||||
{
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace System.Management.Automation
|
||||
LoadHelpFile(helpFile, helpFile, classInfo.Name, reportErrors);
|
||||
}
|
||||
|
||||
return GetFromPSClasseHelpCache(helpFile, Automation.HelpCategory.Class);
|
||||
return GetFromPSClassHelpCache(helpFile, Automation.HelpCategory.Class);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -238,7 +238,7 @@ namespace System.Management.Automation
|
||||
/// <param name="helpFileIdentifier">help file identifier (either name of PSSnapIn or simply full path to help file)</param>
|
||||
/// <param name="helpCategory">Help Category for search.</param>
|
||||
/// <returns>HelpInfo object.</returns>
|
||||
private HelpInfo GetFromPSClasseHelpCache(string helpFileIdentifier, HelpCategory helpCategory)
|
||||
private HelpInfo GetFromPSClassHelpCache(string helpFileIdentifier, HelpCategory helpCategory)
|
||||
{
|
||||
Debug.Assert(!string.IsNullOrEmpty(helpFileIdentifier), "helpFileIdentifier should not be null or empty.");
|
||||
|
||||
|
||||
@@ -443,33 +443,33 @@ namespace Microsoft.PowerShell.Commands
|
||||
IList iListArg = ParameterBinderBase.GetIList(argument);
|
||||
if (iListArg != null && iListArg.Count > 0)
|
||||
{
|
||||
int elemtCount = iListArg.Count;
|
||||
int elementCount = iListArg.Count;
|
||||
int targetIndex = 0;
|
||||
var target = Array.CreateInstance(typeof(object), elemtCount);
|
||||
var target = Array.CreateInstance(typeof(object), elementCount);
|
||||
|
||||
foreach (object elemt in iListArg)
|
||||
foreach (object element in iListArg)
|
||||
{
|
||||
var elemtValue = PSObject.Base(elemt);
|
||||
var elementValue = PSObject.Base(element);
|
||||
|
||||
if (elemtValue is PSModuleInfo)
|
||||
if (elementValue is PSModuleInfo)
|
||||
{
|
||||
target.SetValue(elemtValue, targetIndex++);
|
||||
target.SetValue(elementValue, targetIndex++);
|
||||
}
|
||||
else if (elemtValue is string)
|
||||
else if (elementValue is string)
|
||||
{
|
||||
var elemtAsModuleObj = new PSModuleInfo(name: (string)elemtValue, path: null, context: null, sessionState: null);
|
||||
target.SetValue(elemtAsModuleObj, targetIndex++);
|
||||
var elementAsModuleObj = new PSModuleInfo(name: (string)elementValue, path: null, context: null, sessionState: null);
|
||||
target.SetValue(elementAsModuleObj, targetIndex++);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSModuleInfo elementValueModuleInfo = null;
|
||||
if (TryConvertFromDeserializedModuleInfo(elemtValue, out elementValueModuleInfo))
|
||||
if (TryConvertFromDeserializedModuleInfo(elementValue, out elementValueModuleInfo))
|
||||
{
|
||||
target.SetValue(elementValueModuleInfo, targetIndex++);
|
||||
}
|
||||
else
|
||||
{
|
||||
target.SetValue(elemt, targetIndex++);
|
||||
target.SetValue(element, targetIndex++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1020,11 +1020,11 @@ namespace System.Management.Automation.Help
|
||||
{
|
||||
if (_progressEvents.Count > 0)
|
||||
{
|
||||
foreach (UpdatableHelpProgressEventArgs evnt in _progressEvents)
|
||||
foreach (UpdatableHelpProgressEventArgs evt in _progressEvents)
|
||||
{
|
||||
evnt.CommandType = commandType;
|
||||
evt.CommandType = commandType;
|
||||
|
||||
OnProgressChanged(this, evnt);
|
||||
OnProgressChanged(this, evt);
|
||||
}
|
||||
|
||||
_progressEvents.Clear();
|
||||
|
||||
Reference in New Issue
Block a user