From 281f2a3ea1f8f6bbb892d18048d04ca9d305d479 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 07:12:42 +0000 Subject: [PATCH] spelling: locals in src/Microsoft.PowerShell.Commands.Management --- .../commands/management/Computer.cs | 2 +- .../management/GetWMIObjectCommand.cs | 4 ++-- .../commands/management/Service.cs | 4 ++-- .../commands/management/WMIHelper.cs | 22 +++++++++---------- .../commands/management/WebServiceProxy.cs | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs index ca84a60b0..86034f62f 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs @@ -6264,7 +6264,7 @@ $result [DllImport("Netapi32.dll", SetLastError = true)] internal static extern int NetApiBufferFree(IntPtr Buffer); - internal const int WorkrGroupMachine = 2692; + internal const int WorkGroupMachine = 2692; internal const int MaxMachineNameLength = 15; } diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs index 5c80e1767..93b8272e5 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs @@ -340,8 +340,8 @@ namespace Microsoft.PowerShell.Commands // When -List is not specified and -Recurse is specified, we need the -Class parameter to compose the right query string if (this.Recurse.IsPresent && string.IsNullOrEmpty(Class)) { - string errormMsg = string.Format(CultureInfo.InvariantCulture, WmiResources.WmiParameterMissing, "-Class"); - ErrorRecord er = new ErrorRecord(new InvalidOperationException(errormMsg), "InvalidOperationException", ErrorCategory.InvalidOperation, null); + string errorMsg = string.Format(CultureInfo.InvariantCulture, WmiResources.WmiParameterMissing, "-Class"); + ErrorRecord er = new ErrorRecord(new InvalidOperationException(errorMsg), "InvalidOperationException", ErrorCategory.InvalidOperation, null); WriteError(er); return; } diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs index 62ba61451..0866a8c39 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs @@ -683,9 +683,9 @@ namespace Microsoft.PowerShell.Commands } if (RequiredServices.IsPresent) { - foreach (ServiceController servdependedon in service.ServicesDependedOn) + foreach (ServiceController servicedependedon in service.ServicesDependedOn) { - WriteObject(servdependedon); + WriteObject(servicedependedon); } } } diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs index 33dcce1fa..a989be64d 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs @@ -835,12 +835,12 @@ namespace Microsoft.PowerShell.Commands ArrayList namespaceArray = new ArrayList(); ArrayList sinkArray = new ArrayList(); ArrayList connectArray = new ArrayList(); // Optimization for remote namespace - int currentNamesapceCount = 0; + int currentNamespaceCount = 0; namespaceArray.Add(getObject.Namespace); bool topNamespace = true; - while (currentNamesapceCount < namespaceArray.Count) + while (currentNamespaceCount < namespaceArray.Count) { - string connectNamespace = (string)namespaceArray[currentNamesapceCount]; + string connectNamespace = (string)namespaceArray[currentNamespaceCount]; ManagementScope scope = new ManagementScope(WMIHelper.GetScopeString(_computerName, connectNamespace), options); scope.Connect(); ManagementClass namespaceClass = new ManagementClass(scope, new ManagementPath("__Namespace"), new ObjectGetOptions()); @@ -861,7 +861,7 @@ namespace Microsoft.PowerShell.Commands sinkArray.Add(_job.GetNewSink()); } connectArray.Add(scope); - currentNamesapceCount++; + currentNamespaceCount++; } if ((sinkArray.Count != namespaceArray.Count) || (connectArray.Count != namespaceArray.Count)) // not expected throw exception @@ -872,14 +872,14 @@ namespace Microsoft.PowerShell.Commands return; } - currentNamesapceCount = 0; - while (currentNamesapceCount < namespaceArray.Count) + currentNamespaceCount = 0; + while (currentNamespaceCount < namespaceArray.Count) { - string connectNamespace = (string)namespaceArray[currentNamesapceCount]; - ManagementObjectSearcher searcher = getObject.GetObjectList((ManagementScope)connectArray[currentNamesapceCount]); + string connectNamespace = (string)namespaceArray[currentNamespaceCount]; + ManagementObjectSearcher searcher = getObject.GetObjectList((ManagementScope)connectArray[currentNamespaceCount]); if (searcher == null) { - currentNamesapceCount++; + currentNamespaceCount++; continue; } if (topNamespace) @@ -889,9 +889,9 @@ namespace Microsoft.PowerShell.Commands } else { - searcher.Get((ManagementOperationObserver)sinkArray[currentNamesapceCount]); + searcher.Get((ManagementOperationObserver)sinkArray[currentNamespaceCount]); } - currentNamesapceCount++; + currentNamespaceCount++; } } else diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/WebServiceProxy.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/WebServiceProxy.cs index 4c01b17f4..2ab9130a4 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/WebServiceProxy.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/WebServiceProxy.cs @@ -203,7 +203,7 @@ namespace Microsoft.PowerShell.Commands Assembly webserviceproxy = GenerateWebServiceProxyAssembly(_namespace, _class); if (webserviceproxy == null) return; - Object instance = InstantinateWebServiceProxy(webserviceproxy); + Object instance = InstantiateWebServiceProxy(webserviceproxy); //to set the credentials into the generated webproxy Object PropertyInfo[] pinfo = instance.GetType().GetProperties(); @@ -444,7 +444,7 @@ namespace Microsoft.PowerShell.Commands /// /// /// - private object InstantinateWebServiceProxy(Assembly assembly) + private object InstantiateWebServiceProxy(Assembly assembly) { Type proxyType = null; //loop through the types of the assembly and identify the type having