diff --git a/src/System.Management.Automation/help/CommandHelpProvider.cs b/src/System.Management.Automation/help/CommandHelpProvider.cs index ce5a6911ee..ff96a56e85 100644 --- a/src/System.Management.Automation/help/CommandHelpProvider.cs +++ b/src/System.Management.Automation/help/CommandHelpProvider.cs @@ -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 /// /// PSSnapIn Name for the current help file. /// - private void ProcessUserDefineddHelpData(string mshSnapInId, UserDefinedHelpData userDefinedHelpData) + private void ProcessUserDefinedHelpData(string mshSnapInId, UserDefinedHelpData userDefinedHelpData) { if (userDefinedHelpData == null) return; diff --git a/src/System.Management.Automation/help/HelpProviderWithCache.cs b/src/System.Management.Automation/help/HelpProviderWithCache.cs index 94a7a1ce7d..5bf03d8083 100644 --- a/src/System.Management.Automation/help/HelpProviderWithCache.cs +++ b/src/System.Management.Automation/help/HelpProviderWithCache.cs @@ -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]; diff --git a/src/System.Management.Automation/help/MamlUtil.cs b/src/System.Management.Automation/help/MamlUtil.cs index 719a0c5d80..f4e97a74e6 100644 --- a/src/System.Management.Automation/help/MamlUtil.cs +++ b/src/System.Management.Automation/help/MamlUtil.cs @@ -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 maml1items = new List(); array = propertyInfo1.Value as Array; if (array != null) @@ -190,7 +190,7 @@ namespace System.Management.Automation /// /// Get property info. /// - 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) { diff --git a/src/System.Management.Automation/help/PSClassHelpProvider.cs b/src/System.Management.Automation/help/PSClassHelpProvider.cs index c3292024e2..ef78780563 100644 --- a/src/System.Management.Automation/help/PSClassHelpProvider.cs +++ b/src/System.Management.Automation/help/PSClassHelpProvider.cs @@ -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 /// help file identifier (either name of PSSnapIn or simply full path to help file) /// Help Category for search. /// HelpInfo object. - 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."); diff --git a/src/System.Management.Automation/help/SaveHelpCommand.cs b/src/System.Management.Automation/help/SaveHelpCommand.cs index e811074690..3d00018455 100644 --- a/src/System.Management.Automation/help/SaveHelpCommand.cs +++ b/src/System.Management.Automation/help/SaveHelpCommand.cs @@ -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++); } } } diff --git a/src/System.Management.Automation/help/UpdatableHelpSystem.cs b/src/System.Management.Automation/help/UpdatableHelpSystem.cs index 1aad343e53..a8aec1a9c7 100644 --- a/src/System.Management.Automation/help/UpdatableHelpSystem.cs +++ b/src/System.Management.Automation/help/UpdatableHelpSystem.cs @@ -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();