From 96e9b64b6574ee7f3b45b9b3b4aa088a483de962 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 07:04:51 +0000 Subject: [PATCH 01/29] spelling: locals in src/libpsl-native/test --- src/libpsl-native/test/test-getlinkcount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpsl-native/test/test-getlinkcount.cpp b/src/libpsl-native/test/test-getlinkcount.cpp index fbe1a001f..4d3d10336 100644 --- a/src/libpsl-native/test/test-getlinkcount.cpp +++ b/src/libpsl-native/test/test-getlinkcount.cpp @@ -81,7 +81,7 @@ TEST_F(getLinkCountTest, LinkCountOfSinglyLinkedFile) removeFile(file); } -TEST_F(getLinkCountTest, LinkCountOfMultipliLinkedFile) +TEST_F(getLinkCountTest, LinkCountOfMultiplyLinkedFile) { createFileForTesting(file); std::string newFile = createHardLink(file); From 445467d517e6d5dddbf5afc4e19c4d4d6fe93e3a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 21:55:36 +0000 Subject: [PATCH 02/29] spelling: locals in src/Microsoft.Management.Infrastructure.CimCmdlets --- .../CimCommandBase.cs | 2 +- .../CimIndicationWatcher.cs | 8 ++++---- .../CimSessionOperations.cs | 4 ++-- .../CimSetCimInstance.cs | 6 +++--- .../NewCimSessionCommand.cs | 2 +- .../Utils.cs | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs index 24377e183..2ea726c77 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs @@ -855,7 +855,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// certificate parameter set /// - internal const string CertificatePrameterSet = "CertificatePrameterSet"; + internal const string CertificateParameterSet = "CertificateParameterSet"; /// /// CimInstance parameter alias diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimIndicationWatcher.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimIndicationWatcher.cs index a765abae1..608385fe2 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimIndicationWatcher.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimIndicationWatcher.cs @@ -220,7 +220,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets this.nameSpace = theNameSpace; this.queryDialect = ConstValue.GetQueryDialectWithDefault(theQueryDialect); this.queryExpression = theQueryExpression; - this.opreationTimeout = theOpreationTimeout; + this.operationTimeout = theOpreationTimeout; this.computerName = theComputerName; } @@ -299,7 +299,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets this.nameSpace, this.queryDialect, this.queryExpression, - this.opreationTimeout); + this.operationTimeout); } else { @@ -308,7 +308,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets this.nameSpace, this.queryDialect, this.queryExpression, - this.opreationTimeout); + this.operationTimeout); } status = Status.Started; } @@ -392,7 +392,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets private string nameSpace; private string queryDialect; private string queryExpression; - private UInt32 opreationTimeout; + private UInt32 operationTimeout; #endregion #endregion } diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionOperations.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionOperations.cs index 87d688c37..d17891c08 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionOperations.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionOperations.cs @@ -971,8 +971,8 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets CimTestCimSessionContext testCimSessionContext = context as CimTestCimSessionContext; UInt32 sessionId = this.sessionState.GenerateSessionId(); - string orginalSessioName = testCimSessionContext.CimSessionWrapper.Name; - string sessionName = (orginalSessioName != null) ? orginalSessioName : String.Format(CultureInfo.CurrentUICulture, @"{0}{1}", CimSessionState.CimSessionClassName, sessionId); + string originalSessionName = testCimSessionContext.CimSessionWrapper.Name; + string sessionName = (originalSessionName != null) ? originalSessionName : String.Format(CultureInfo.CurrentUICulture, @"{0}{1}", CimSessionState.CimSessionClassName, sessionId); // detach CimSession from the proxy object CimSession createdCimSession = testCimSessionContext.Proxy.Detach(); diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSetCimInstance.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSetCimInstance.cs index dc8d21355..46e40ef53 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSetCimInstance.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSetCimInstance.cs @@ -141,17 +141,17 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets } Exception exception = null; - CimInstance intance = cmdlet.CimInstance; + CimInstance instance = cmdlet.CimInstance; // For CimInstance parameter sets, Property is an optional parameter if (cmdlet.Property != null) { - if (!SetProperty(cmdlet.Property, ref intance, ref exception)) + if (!SetProperty(cmdlet.Property, ref instance, ref exception)) { cmdlet.ThrowTerminatingError(exception, action); return; } } - proxy.ModifyInstanceAsync(nameSpace, intance); + proxy.ModifyInstanceAsync(nameSpace, instance); } break; case CimBaseCommand.QueryComputerSet: diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/NewCimSessionCommand.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/NewCimSessionCommand.cs index 21c109d23..99b7d46bd 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/NewCimSessionCommand.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/NewCimSessionCommand.cs @@ -64,7 +64,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// This is specificly for wsman protocol. /// [Parameter(ValueFromPipelineByPropertyName = true, - ParameterSetName = CertificatePrameterSet)] + ParameterSetName = CertificateParameterSet)] public String CertificateThumbprint { get { return certificatethumbprint; } diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs index edf8f370d..0c32a5180 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs @@ -157,11 +157,11 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// Flag used to control generating message into powershell /// - private static bool genrateVerboseMessage = true; - internal static bool GenrateVerboseMessage + private static bool generateVerboseMessage = true; + internal static bool GenerateVerboseMessage { - get { return genrateVerboseMessage; } - set { genrateVerboseMessage = value; } + get { return generateVerboseMessage; } + set { generateVerboseMessage = value; } } /// @@ -203,7 +203,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets internal static string removeParameterSetName = @"Remove parameter set {0} name from cache"; internal static string currentParameterSetNameCount = @"Cache have {0} parameter set names"; internal static string currentParameterSetNameInCache = @"Cache have parameter set {0} valid {1}"; - internal static string currentnonMadatoryParameterSetInCache = @"Cache have optional parameter set {0} valid {1}"; + internal static string currentnonMandatoryParameterSetInCache = @"Cache have optional parameter set {0} valid {1}"; internal static string optionalParameterSetNameCount = @"Cache have {0} optional parameter set names"; internal static string finalParameterSetName = @"------Final parameter set name of the cmdlet is {0}"; internal static string addToOptionalParameterSet = @"Add to optional ParameterSetNames {0}"; From 8fba57f5a02257ecc7f331a45015e1e11cf0983f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 07:08:09 +0000 Subject: [PATCH 03/29] spelling: locals in src/Microsoft.PackageManagement.MsiProvider --- .../Deployment/WindowsInstaller.Linq/QTable.cs | 4 ++-- .../Deployment/WindowsInstaller.Linq/Query.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/QTable.cs b/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/QTable.cs index eab1b0aa1..d5b2c573f 100644 --- a/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/QTable.cs +++ b/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/QTable.cs @@ -228,9 +228,9 @@ namespace Microsoft.PackageManagement.Msi.Internal.Deployment.WindowsInstaller.L return q; } - private static LambdaExpression GetJoinLambda(Expression expresion) + private static LambdaExpression GetJoinLambda(Expression expression) { - UnaryExpression unaryExpression = (UnaryExpression) expresion; + UnaryExpression unaryExpression = (UnaryExpression) expression; return (LambdaExpression) unaryExpression.Operand; } diff --git a/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/Query.cs b/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/Query.cs index 189228972..5f74fc470 100644 --- a/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/Query.cs +++ b/src/Microsoft.PackageManagement.MsiProvider/Deployment/WindowsInstaller.Linq/Query.cs @@ -312,9 +312,9 @@ namespace Microsoft.PackageManagement.Msi.Internal.Deployment.WindowsInstaller.L return this.CreateQuery(expression); } - private static LambdaExpression GetJoinLambda(Expression expresion) + private static LambdaExpression GetJoinLambda(Expression expression) { - UnaryExpression unaryExpression = (UnaryExpression) expresion; + UnaryExpression unaryExpression = (UnaryExpression) expression; return (LambdaExpression) unaryExpression.Operand; } From 7c876d4482b5981d14c1c1bd3aa94ffedb2a5444 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 22:02:29 +0000 Subject: [PATCH 04/29] spelling: locals in src/Microsoft.PackageManagement.PackageSourceListProvider --- .../PackageList/NupkgInstaller.cs | 4 ++-- .../PackageList/PackageListRequest.cs | 8 ++++---- .../PackageList/PowerShellArtifactInstaller.cs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs index 30e538785..422282d77 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs @@ -154,7 +154,7 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider var provider = request.PackageManagementService.GetAvailableProviders(request, new[] {"NuGet"}).FirstOrDefault(); if (provider != null) { - var donwloadrequest = PackageSourceListRequest.ExtendRequest( + var downloadrequest = PackageSourceListRequest.ExtendRequest( new Dictionary { {"Destination", new[] {package.Destination ?? ""}} @@ -163,7 +163,7 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider package.IsTrustedSource, request); - var downloading = provider.DownloadPackage(pkgs[0], location, donwloadrequest); + var downloading = provider.DownloadPackage(pkgs[0], location, downloadrequest); foreach (var i in downloading) { diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs index 83c07f853..8eadc1fa0 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs @@ -97,7 +97,7 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider } } - internal string DefaultCatlogFileLocation + internal string DefaultCatalogFileLocation { get { @@ -970,9 +970,9 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider if (force || this.ShouldContinue(Resources.Messages.QueryDownloadPackageSourceList.format(DefaultJSONSourceLocation), Resources.Messages.PackageSourceListNotFound.format(DefaultJSONFileLocation))) { WebDownloader.DownloadFile(DefaultJSONSourceLocation, DefaultJSONFileLocation, this, null); - WebDownloader.DownloadFile(DefaultJSONCatalogFileLocation, DefaultCatlogFileLocation, this, null); - if (System.IO.File.Exists(DefaultJSONFileLocation) && System.IO.File.Exists(DefaultCatlogFileLocation) && - PackageSourceListProvider.TestCatalogFile(DefaultJSONFileLocation, DefaultCatlogFileLocation, this)) + WebDownloader.DownloadFile(DefaultJSONCatalogFileLocation, DefaultCatalogFileLocation, this, null); + if (System.IO.File.Exists(DefaultJSONFileLocation) && System.IO.File.Exists(DefaultCatalogFileLocation) && + PackageSourceListProvider.TestCatalogFile(DefaultJSONFileLocation, DefaultCatalogFileLocation, this)) { addDefaultConfig = true; } diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs index d7026a148..d15430302 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs @@ -92,7 +92,7 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider return; } - int packagesRecevied = 0; + int packagesReceived = 0; foreach (var i in installing) { request.YieldSoftwareIdentity(i.FastPackageReference, i.Name, i.Version, i.VersionScheme, i.Summary, i.Source, i.SearchKey, i.FullPath, i.PackageFilename); @@ -111,10 +111,10 @@ namespace Microsoft.PackageManagement.PackageSourceListProvider request.PackageManagementService.ImportPackageProvider(request, packageJson.Name, null, null, null, isRooted: false, force: false); } } - packagesRecevied++; + packagesReceived++; } - request.Verbose(Resources.Messages.NumberOfPackagesRecevied, packagesRecevied, provider.Name, "install-package"); + request.Verbose(Resources.Messages.NumberOfPackagesRecevied, packagesReceived, provider.Name, "install-package"); } internal static void GeInstalledPowershellArtifacts(PackageJson package, string requiredVersion, string minimumVersion, string maximumVersion, Dictionary fastPackReftable, PackageSourceListRequest request) From 281f2a3ea1f8f6bbb892d18048d04ca9d305d479 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 07:12:42 +0000 Subject: [PATCH 05/29] 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 From b2dfcf38355de05cd6b40de61878a6cc7e8b014b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 30 Aug 2016 02:48:16 +0000 Subject: [PATCH 06/29] spelling: locals in src/Microsoft.PowerShell.Commands.Utility --- .../commands/utility/CSVCommands.cs | 2 +- .../commands/utility/DebugRunspaceCommand.cs | 6 +++--- .../FormatAndOutput/out-printer/PrinterLineOutput.cs | 6 +++--- .../utility/WebCmdlet/FullClr/WebRequestPSCmdlet.FullClr.cs | 4 ++-- .../commands/utility/select-object.cs | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CSVCommands.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CSVCommands.cs index cc7e0d219..377607e97 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CSVCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CSVCommands.cs @@ -214,7 +214,7 @@ namespace Microsoft.PowerShell.Commands /// [Parameter] public SwitchParameter Append { get; set; } - private bool _isActuallyAppending; // true if Append=true AND the file written was not empty (or nonexistant) when the cmdlet was invoked + private bool _isActuallyAppending; // true if Append=true AND the file written was not empty (or nonexistent) when the cmdlet was invoked #endregion diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/DebugRunspaceCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/DebugRunspaceCommand.cs index 18a4c3a73..d87c9029d 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/DebugRunspaceCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/DebugRunspaceCommand.cs @@ -45,7 +45,7 @@ namespace Microsoft.PowerShell.Commands // Debugging to persist until Ctrl+C or Debugger 'Exit' stops cmdlet. private bool _debugging; private ManualResetEventSlim _newRunningScriptEvent = new ManualResetEventSlim(true); - private RunspaceAvailability _previousRunspaceAvailablity = RunspaceAvailability.None; + private RunspaceAvailability _previousRunspaceAvailability = RunspaceAvailability.None; #endregion @@ -409,8 +409,8 @@ namespace Microsoft.PowerShell.Commands } } - RunspaceAvailability prevAvailability = _previousRunspaceAvailablity; - _previousRunspaceAvailablity = e.RunspaceAvailability; + RunspaceAvailability prevAvailability = _previousRunspaceAvailability; + _previousRunspaceAvailability = e.RunspaceAvailability; if ((e.RunspaceAvailability == RunspaceAvailability.Available) || (e.RunspaceAvailability == RunspaceAvailability.None)) { diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs index 15ea11247..a37177768 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs @@ -225,7 +225,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format // Use the MarginBounds on the event to do this float linesPerPage = ev.MarginBounds.Height / _printFont.GetHeight(ev.Graphics); - if (!_printingInitalized) + if (!_printingInitialized) { // on the first page we have to initialize the metrics for LineOutput @@ -234,7 +234,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format float w = ev.Graphics.MeasureString(s, _printFont).Width / s.Length; float columnsPerPage = ev.MarginBounds.Width / w; - _printingInitalized = true; + _printingInitialized = true; _deviceRows = (int)linesPerPage; _deviceColumns = (int)columnsPerPage; @@ -268,7 +268,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format /// /// flag for one time initialization of the interface (columns, etc.) /// - private bool _printingInitalized = false; + private bool _printingInitialized = false; /// /// callback to ask the outputter to playback its cache diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FullClr/WebRequestPSCmdlet.FullClr.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FullClr/WebRequestPSCmdlet.FullClr.cs index e148ea23b..0d7761772 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FullClr/WebRequestPSCmdlet.FullClr.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FullClr/WebRequestPSCmdlet.FullClr.cs @@ -55,7 +55,7 @@ namespace Microsoft.PowerShell.Commands request.Headers.Clear(); foreach (string key in WebSession.Headers.Keys) { - bool setHeaderViaProperty = TryMapHeaaderToProperty(webRequest, key); + bool setHeaderViaProperty = TryMapHeaderToProperty(webRequest, key); if (!setHeaderViaProperty) { @@ -150,7 +150,7 @@ namespace Microsoft.PowerShell.Commands return (request); } - private bool TryMapHeaaderToProperty(HttpWebRequest webRequest, string key) + private bool TryMapHeaderToProperty(HttpWebRequest webRequest, string key) { bool setHeaderViaProperty = false; diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/select-object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/select-object.cs index ff0446514..be87e1251 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/select-object.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/select-object.cs @@ -361,15 +361,15 @@ namespace Microsoft.PowerShell.Commands PSObject result = new PSObject(); if (matchedProperties.Count != 0) { - HashSet propertNames = new HashSet(StringComparer.OrdinalIgnoreCase); + HashSet propertyNames = new HashSet(StringComparer.OrdinalIgnoreCase); foreach (PSNoteProperty noteProperty in matchedProperties) { try { - if (!propertNames.Contains(noteProperty.Name)) + if (!propertyNames.Contains(noteProperty.Name)) { - propertNames.Add(noteProperty.Name); + propertyNames.Add(noteProperty.Name); result.Properties.Add(noteProperty); } else From 0238f03f38fadabd976aabe2aac4d75cc20c2ddf Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Fri, 2 Sep 2016 15:14:38 +0000 Subject: [PATCH 07/29] spelling: locals in src/Microsoft.PowerShell.ConsoleHost --- .../host/msh/ConsoleHostRawUserInterface.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index 9768e175f..b4687e30d 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -860,9 +860,9 @@ namespace Microsoft.PowerShell ConsoleControl.INPUT_RECORD[] inputRecords = new ConsoleControl.INPUT_RECORD[ConsoleControl.GetNumberOfConsoleInputEvents(handle)]; - int acutalNumberOfInputRecords = ConsoleControl.PeekConsoleInput(handle, ref inputRecords); + int actualNumberOfInputRecords = ConsoleControl.PeekConsoleInput(handle, ref inputRecords); - for (int i = 0; i < acutalNumberOfInputRecords; i++) + for (int i = 0; i < actualNumberOfInputRecords; i++) { if (((ConsoleControl.InputRecordEventTypes)inputRecords[i].EventType) == ConsoleControl.InputRecordEventTypes.KEY_EVENT) From abb27e417d85c0f31c05283f05abf0211b896d71 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 07:16:49 +0000 Subject: [PATCH 08/29] spelling: locals in src/Microsoft.PowerShell.CoreCLR.Eventing --- .../DotNetCode/Eventing/EventProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProvider.cs b/src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProvider.cs index 5b25bb08c..f78e5e7f7 100644 --- a/src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProvider.cs +++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProvider.cs @@ -31,7 +31,7 @@ namespace System.Diagnostics.Eventing private static Guid t_activityId; private const int s_basicTypeAllocationBufferSize = 16; - private const int s_etwMaxMumberArguments = 32; + private const int s_etwMaxNumberArguments = 32; private const int s_etwAPIMaxStringCount = 8; private const int s_maxEventDataDescriptors = 128; private const int s_traceEventMaximumSize = 65482; @@ -625,13 +625,13 @@ namespace System.Diagnostics.Eventing if ((eventPayload != null) && (eventPayload.Length != 0)) { argCount = eventPayload.Length; - if (argCount > s_etwMaxMumberArguments) + if (argCount > s_etwMaxNumberArguments) { // //too many arguments to log // throw new ArgumentOutOfRangeException("eventPayload", - string.Format(CultureInfo.CurrentCulture, DotNetEventingStrings.ArgumentOutOfRange_MaxArgExceeded, s_etwMaxMumberArguments)); + string.Format(CultureInfo.CurrentCulture, DotNetEventingStrings.ArgumentOutOfRange_MaxArgExceeded, s_etwMaxNumberArguments)); } uint totalEventSize = 0; From dbc0956c9f2ca2c64495265108a42f98511d3e94 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 17:42:15 +0000 Subject: [PATCH 09/29] spelling: locals in src/Microsoft.PowerShell.GraphicalHost --- .../HelpWindow/HelpParagraphBuilder.cs | 14 +++++++------- .../HelpWindow/ParagraphBuilder.cs | 16 ++++++++-------- .../ShowCommand/ViewModel/CommandViewModel.cs | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/HelpParagraphBuilder.cs b/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/HelpParagraphBuilder.cs index 1a548ce8f..3cf59a8ef 100644 --- a/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/HelpParagraphBuilder.cs +++ b/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/HelpParagraphBuilder.cs @@ -248,12 +248,12 @@ namespace Microsoft.Management.UI.Internal /// Splits the string adding indentation before each line /// /// string to add indentation to - /// number of indentations + /// number of indentations /// the string indented - private static string AddIndent(string str, int numberOfIdents) + private static string AddIndent(string str, int numberOfIndents) { StringBuilder indent = new StringBuilder(); - indent.Append(' ', numberOfIdents * HelpParagraphBuilder.IndentSize); + indent.Append(' ', numberOfIndents * HelpParagraphBuilder.IndentSize); return HelpParagraphBuilder.AddIndent(str, indent.ToString()); } @@ -421,22 +421,22 @@ namespace Microsoft.Management.UI.Internal parameterNameOptionalCloseBrace = "]"; } - string paramterPrefix = String.Format( + string parameterPrefix = String.Format( CultureInfo.CurrentCulture, "{0}{1}-", parameterOptionalOpenBrace, parameterNameOptionalOpenBrace); - this.AddText(paramterPrefix, false); + this.AddText(parameterPrefix, false); this.AddText(parameterName, true); - string paramterSuffix = String.Format( + string parameterSuffix = String.Format( CultureInfo.CurrentCulture, "{0} {1}{2} ", parameterNameOptionalCloseBrace, parameterType, parameterOptionalCloseBrace); - this.AddText(paramterSuffix, false); + this.AddText(parameterSuffix, false); } string commonParametersText = String.Format( diff --git a/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/ParagraphBuilder.cs b/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/ParagraphBuilder.cs index ccbca3307..1ae7aaf0f 100644 --- a/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/ParagraphBuilder.cs +++ b/src/Microsoft.PowerShell.GraphicalHost/HelpWindow/ParagraphBuilder.cs @@ -31,7 +31,7 @@ namespace Microsoft.Management.UI.Internal /// /// The text spans that should be highlighted /// - private List highlighedSpans; + private List highlightedSpans; /// /// The text displayed @@ -56,7 +56,7 @@ namespace Microsoft.Management.UI.Internal this.paragraph = paragraph; this.boldSpans = new List(); - this.highlighedSpans = new List(); + this.highlightedSpans = new List(); this.textBuilder = new StringBuilder(); } @@ -72,7 +72,7 @@ namespace Microsoft.Management.UI.Internal /// internal int HighlightCount { - get { return this.highlighedSpans.Count; } + get { return this.highlightedSpans.Count; } } /// @@ -100,7 +100,7 @@ namespace Microsoft.Management.UI.Internal int currentBoldIndex = 0; TextSpan? currentBoldSpan = this.boldSpans.Count == 0 ? (TextSpan?)null : this.boldSpans[0]; int currentHighlightedIndex = 0; - TextSpan? currentHighlightedSpan = this.highlighedSpans.Count == 0 ? (TextSpan?)null : this.highlighedSpans[0]; + TextSpan? currentHighlightedSpan = this.highlightedSpans.Count == 0 ? (TextSpan?)null : this.highlightedSpans[0]; bool currentBold = false; bool currentHighlighted = false; @@ -115,7 +115,7 @@ namespace Microsoft.Management.UI.Internal ParagraphBuilder.MoveSpanToPosition(ref currentBoldIndex, ref currentBoldSpan, i, this.boldSpans); newBold = currentBoldSpan == null ? false : currentBoldSpan.Value.Contains(i); - ParagraphBuilder.MoveSpanToPosition(ref currentHighlightedIndex, ref currentHighlightedSpan, i, this.highlighedSpans); + ParagraphBuilder.MoveSpanToPosition(ref currentHighlightedIndex, ref currentHighlightedSpan, i, this.highlightedSpans); newHighlighted = currentHighlightedSpan == null ? false : currentHighlightedSpan.Value.Contains(i); if (newBold != currentBold || newHighlighted != currentHighlighted) @@ -142,7 +142,7 @@ namespace Microsoft.Management.UI.Internal /// true if we should search whole word only internal void HighlightAllInstancesOf(string search, bool caseSensitive, bool wholeWord) { - this.highlighedSpans.Clear(); + this.highlightedSpans.Clear(); if (search == null || search.Trim().Length == 0) { @@ -216,7 +216,7 @@ namespace Microsoft.Management.UI.Internal internal void ResetAllText() { this.boldSpans.Clear(); - this.highlighedSpans.Clear(); + this.highlightedSpans.Clear(); this.textBuilder.Clear(); } @@ -298,7 +298,7 @@ namespace Microsoft.Management.UI.Internal throw new ArgumentOutOfRangeException("length"); } - this.highlighedSpans.Add(new TextSpan(start, length)); + this.highlightedSpans.Add(new TextSpan(start, length)); } /// diff --git a/src/Microsoft.PowerShell.GraphicalHost/ShowCommand/ViewModel/CommandViewModel.cs b/src/Microsoft.PowerShell.GraphicalHost/ShowCommand/ViewModel/CommandViewModel.cs index fa2667892..5825c7b5d 100644 --- a/src/Microsoft.PowerShell.GraphicalHost/ShowCommand/ViewModel/CommandViewModel.cs +++ b/src/Microsoft.PowerShell.GraphicalHost/ShowCommand/ViewModel/CommandViewModel.cs @@ -70,7 +70,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal /// /// Field used for the CommonParameters parameter. /// - private ParameterSetViewModel comonParameters; + private ParameterSetViewModel commonParameters; /// /// The ShowCommandCommandInfo this model is based on @@ -239,7 +239,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal /// public ParameterSetViewModel CommonParameters { - get { return this.comonParameters; } + get { return this.commonParameters; } } /// @@ -537,7 +537,7 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal } List commonParametersList = commonParametersTable.Values.ToList(); - returnValue.comonParameters = new ParameterSetViewModel(String.Empty, commonParametersList); + returnValue.commonParameters = new ParameterSetViewModel(String.Empty, commonParametersList); returnValue.parameterSets.Sort(returnValue.Compare); From 2c2066a0b018a5a2dfd95b4e28f824d3365ddae3 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 22:11:13 +0000 Subject: [PATCH 10/29] spelling: locals in src/Microsoft.PowerShell.PackageManagement --- .../Cmdlets/FindPackage.cs | 4 ++-- .../Cmdlets/FindPackageProvider.cs | 4 ++-- .../Cmdlets/InstallPackageProvider.cs | 4 ++-- .../Utility/HostApiExtensions.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackage.cs b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackage.cs index 8c3a2d414..154514b0a 100644 --- a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackage.cs +++ b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackage.cs @@ -80,8 +80,8 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets { // this dep is not processed yet if (!processedDependencies.Contains(dep)) { - var dependendcies = PackageManagementService.FindPackageByCanonicalId(dep, this); - var depPkg = dependendcies.OrderByDescending(pp => pp, SoftwareIdentityVersionComparer.Instance).FirstOrDefault(); + var dependencies = PackageManagementService.FindPackageByCanonicalId(dep, this); + var depPkg = dependencies.OrderByDescending(pp => pp, SoftwareIdentityVersionComparer.Instance).FirstOrDefault(); processedDependencies.Add(dep); diff --git a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackageProvider.cs b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackageProvider.cs index 90040c432..a485803b1 100644 --- a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackageProvider.cs +++ b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/FindPackageProvider.cs @@ -163,8 +163,8 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets if (IncludeDependencies) { var missingDependencies = new HashSet(); foreach (var dep in package.Dependencies) { - var dependendcies = PackageManagementService.FindPackageByCanonicalId(dep, this); - var depPkg = dependendcies.OrderByDescending(pp => pp, SoftwareIdentityVersionComparer.Instance).FirstOrDefault(); + var dependencies = PackageManagementService.FindPackageByCanonicalId(dep, this); + var depPkg = dependencies.OrderByDescending(pp => pp, SoftwareIdentityVersionComparer.Instance).FirstOrDefault(); if (depPkg == null) { missingDependencies.Add(dep); diff --git a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/InstallPackageProvider.cs b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/InstallPackageProvider.cs index 3bac2664c..9b1536ba3 100644 --- a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/InstallPackageProvider.cs +++ b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/InstallPackageProvider.cs @@ -237,8 +237,8 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets foreach (var dep in package.Dependencies) { // note: future work may be needed if the package sources currently selected by the user don't // contain the dependencies. - var dependendcies = PackageManagementService.FindPackageByCanonicalId(dep, this); - foreach (var depPackage in dependendcies) { + var dependencies = PackageManagementService.FindPackageByCanonicalId(dep, this); + foreach (var depPackage in dependencies) { ProcessPackage(depPackage.Provider, searchKey.Select(each => each + depPackage.Name).ToArray(), depPackage); } } diff --git a/src/Microsoft.PowerShell.PackageManagement/Utility/HostApiExtensions.cs b/src/Microsoft.PowerShell.PackageManagement/Utility/HostApiExtensions.cs index 8a9befa73..8d05d6466 100644 --- a/src/Microsoft.PowerShell.PackageManagement/Utility/HostApiExtensions.cs +++ b/src/Microsoft.PowerShell.PackageManagement/Utility/HostApiExtensions.cs @@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.PackageManagement.Utility { } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Required.")] - internal static IHostApi SuprressBootstrapping(this IHostApi parent, bool isProcessing) { + internal static IHostApi SuppressBootstrapping(this IHostApi parent, bool isProcessing) { return new object[] { new { IsInvocation = new Func(() => false), From 4d84d92953b179bb88fb880325707f063c2327fa Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 28 Aug 2016 22:12:03 +0000 Subject: [PATCH 11/29] spelling: locals in src/Microsoft.PowerShell.ScheduledJob --- .../ScheduledJobDefinition.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.ScheduledJob/ScheduledJobDefinition.cs b/src/Microsoft.PowerShell.ScheduledJob/ScheduledJobDefinition.cs index d98f7779f..b6414859a 100644 --- a/src/Microsoft.PowerShell.ScheduledJob/ScheduledJobDefinition.cs +++ b/src/Microsoft.PowerShell.ScheduledJob/ScheduledJobDefinition.cs @@ -324,7 +324,7 @@ namespace Microsoft.PowerShell.ScheduledJob /// - Enabled state /// /// Boolean if this object data is modified. - private bool UpdateDefintionFromWTS() + private bool UpdateDefinitionFromWTS() { bool dataModified = false; @@ -697,7 +697,7 @@ namespace Microsoft.PowerShell.ScheduledJob Exception notFoundEx = null; try { - if (UpdateDefintionFromWTS()) + if (UpdateDefinitionFromWTS()) { SaveToStore(); } From c8dde73d154be0c3446e6d4223b9bda05aee7d1c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 15:43:37 +0000 Subject: [PATCH 12/29] spelling: locals in src/Microsoft.PowerShell.Workflow.ServiceCore --- .../WorkflowCore/ActivityHostProcess.cs | 4 ++-- .../WorkflowCore/ConnectionManager.cs | 2 +- .../InstanceStoreCryptography.cs | 6 ++--- .../InstanceStorePermission.cs | 8 +++---- .../WorkflowCore/PSActivityBase.cs | 6 ++--- .../ServiceCore/WorkflowCore/RuntimeBase.cs | 2 +- .../WorkflowCore/WorkflowDebugger.cs | 2 +- .../WorkflowCore/WorkflowInstance.cs | 24 +++++++++---------- .../ServiceCore/WorkflowCore/WorkflowJob2.cs | 2 +- .../WorkflowCore/WorkflowJobSourceAdapter.cs | 6 ++--- .../WorkflowCore/WorkflowManager.cs | 4 ++-- .../WorkflowPerformanceCounterSetInfo.cs | 4 ++-- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ActivityHostProcess.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ActivityHostProcess.cs index 064367e44..24cb93e3e 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ActivityHostProcess.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ActivityHostProcess.cs @@ -208,8 +208,8 @@ namespace Microsoft.PowerShell.Workflow using (System.Management.Automation.PowerShell ps = System.Management.Automation.PowerShell.Create()) { ps.Runspace = runspace; - string langSript = "$ExecutionContext.SessionState.LanguageMode = '" + _languageMode.Value.ToString() + "'"; - ps.AddScript(langSript); + string langScript = "$ExecutionContext.SessionState.LanguageMode = '" + _languageMode.Value.ToString() + "'"; + ps.AddScript(langScript); ps.Invoke(); } } diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ConnectionManager.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ConnectionManager.cs index 15c98e043..e8077a095 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ConnectionManager.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/ConnectionManager.cs @@ -1491,7 +1491,7 @@ namespace Microsoft.PowerShell.Workflow Connection newConnection = CreateConnection(requestInfo, connections); _perfCountersMgr.UpdateCounterByValue( PSWorkflowPerformanceCounterSetInfo.CounterSetId, - PSWorkflowPerformanceCounterIds.PSRemotingConnectionsClosedReopendCount); + PSWorkflowPerformanceCounterIds.PSRemotingConnectionsClosedReopenedCount); SubmitOperation(new CloseOneAndOpenAnotherOperation(potentialConnection, newConnection)); _perfCountersMgr.UpdateCounterByValue( PSWorkflowPerformanceCounterSetInfo.CounterSetId, diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStoreCryptography.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStoreCryptography.cs index 3bb1a941a..f41849956 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStoreCryptography.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStoreCryptography.cs @@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.Workflow /// /// The additional entry for security 'POWERSHELLWORKFLOW' /// - private static byte[] s_aditionalEntropy = { (byte)'P', (byte)'O', (byte)'W', (byte)'E', (byte)'R', (byte)'S', (byte)'H', (byte)'E', (byte)'L', (byte)'L', (byte)'W', (byte)'O', (byte)'R', (byte)'K', (byte)'F', (byte)'L', (byte)'O', (byte)'W' }; + private static byte[] s_additionalEntropy = { (byte)'P', (byte)'O', (byte)'W', (byte)'E', (byte)'R', (byte)'S', (byte)'H', (byte)'E', (byte)'L', (byte)'L', (byte)'W', (byte)'O', (byte)'R', (byte)'K', (byte)'F', (byte)'L', (byte)'O', (byte)'W' }; /// /// Protect the data. @@ -35,7 +35,7 @@ namespace Microsoft.PowerShell.Workflow { // Encrypt the data using DataProtectionScope.CurrentUser. The result can be decrypted // only by the same current user. - return ProtectedData.Protect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser); + return ProtectedData.Protect(data, s_additionalEntropy, DataProtectionScope.CurrentUser); } catch (CryptographicException e) { @@ -54,7 +54,7 @@ namespace Microsoft.PowerShell.Workflow { try { - return ProtectedData.Unprotect(data, s_aditionalEntropy, DataProtectionScope.CurrentUser); + return ProtectedData.Unprotect(data, s_additionalEntropy, DataProtectionScope.CurrentUser); } catch (CryptographicException e) { diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStorePermission.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStorePermission.cs index 2317389f2..bf86e4806 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStorePermission.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/FileInstanceStore/InstanceStorePermission.cs @@ -19,19 +19,19 @@ namespace Microsoft.PowerShell.Workflow internal static void SetDirectoryPermissions(string folderName) { string account = WindowsIdentity.GetCurrent().Name; - RemoveInheritablePermissons(folderName); + RemoveInheritablePermissions(folderName); AddDirectorySecurity(folderName, account, FileSystemRights.Modify, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow); } - private static void AddDirectorySecurity(string folderName, string account, FileSystemRights rights, InheritanceFlags inheritance, PropagationFlags propogation, AccessControlType controlType) + private static void AddDirectorySecurity(string folderName, string account, FileSystemRights rights, InheritanceFlags inheritance, PropagationFlags propagation, AccessControlType controlType) { DirectoryInfo info = new DirectoryInfo(folderName); DirectorySecurity dSecurity = info.GetAccessControl(); - dSecurity.AddAccessRule(new FileSystemAccessRule(account, rights, inheritance, propogation, controlType)); + dSecurity.AddAccessRule(new FileSystemAccessRule(account, rights, inheritance, propagation, controlType)); info.SetAccessControl(dSecurity); } - private static void RemoveInheritablePermissons(string folderName) + private static void RemoveInheritablePermissions(string folderName) { DirectoryInfo info = new DirectoryInfo(folderName); DirectorySecurity dSecurity = info.GetAccessControl(); diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/PSActivityBase.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/PSActivityBase.cs index e34bf658e..3556e7a6f 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/PSActivityBase.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/PSActivityBase.cs @@ -3121,13 +3121,13 @@ namespace Microsoft.PowerShell.Activities } else { - PSOutOfProcessActivityController delgateController = workflowHost.PSActivityHostController as PSOutOfProcessActivityController; - if (delgateController != null) + PSOutOfProcessActivityController delegateController = workflowHost.PSActivityHostController as PSOutOfProcessActivityController; + if (delegateController != null) { AddHandlersToStreams(commandToRun, args); IAsyncResult asyncResult = - delgateController.BeginInvokePowerShell(commandToRun, input, + delegateController.BeginInvokePowerShell(commandToRun, input, output, implementationContext.PSActivityEnvironment, ActivityHostManagerCallback, diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/RuntimeBase.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/RuntimeBase.cs index 4166027e7..b24ae92c6 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/RuntimeBase.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/RuntimeBase.cs @@ -593,7 +593,7 @@ namespace Microsoft.PowerShell.Workflow /// /// On suspended handler. /// - internal Action OnSuspenedDelegate + internal Action OnSuspendedDelegate { set { this.OnSuspended = value; } } diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowDebugger.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowDebugger.cs index ea2c1b633..e01c8a37c 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowDebugger.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowDebugger.cs @@ -998,7 +998,7 @@ namespace Microsoft.PowerShell.Workflow debugSource = new DebugSource( debugSource.Script, // Update script debugSource.ScriptFile, // Update script filename - existingInfo.XamlDefinition); // Keep XamlDefintion + existingInfo.XamlDefinition); // Keep XamlDefinition } funcToSourceMap.Add(fName, debugSource); diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowInstance.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowInstance.cs index 6fc7fcb03..86232d299 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowInstance.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowInstance.cs @@ -234,13 +234,13 @@ namespace Microsoft.PowerShell.Workflow lock (_syncObject) { - Dictionary> ruspaceIdCollection; - if (_remoteRunspaceIdCollection.TryGetValue(activityId, out ruspaceIdCollection)) + Dictionary> runspaceIdCollection; + if (_remoteRunspaceIdCollection.TryGetValue(activityId, out runspaceIdCollection)) { - if (ruspaceIdCollection != null) + if (runspaceIdCollection != null) { Tuple taskTuple; - ruspaceIdCollection.TryGetValue(taskId, out taskTuple); + runspaceIdCollection.TryGetValue(taskId, out taskTuple); if (taskTuple != null) taskRunspaceId = taskTuple.Item1; @@ -2009,22 +2009,22 @@ namespace Microsoft.PowerShell.Workflow this.workflowApplication.Extensions.Add(this.GetTrackingParticipant()); // adding the custom extensions - IEnumerable extentions = this.Runtime.Configuration.CreateWorkflowExtensions(); - if (extentions != null) + IEnumerable extensions = this.Runtime.Configuration.CreateWorkflowExtensions(); + if (extensions != null) { - foreach (object extention in extentions) + foreach (object extension in extensions) { - this.workflowApplication.Extensions.Add(extention); + this.workflowApplication.Extensions.Add(extension); } } // adding the custom extension creation functions - IEnumerable> extentionFunctions = this.Runtime.Configuration.CreateWorkflowExtensionCreationFunctions(); - if (extentionFunctions != null) + IEnumerable> extensionFunctions = this.Runtime.Configuration.CreateWorkflowExtensionCreationFunctions(); + if (extensionFunctions != null) { - foreach(Func extentionFunc in extentionFunctions) + foreach(Func extensionFunc in extensionFunctions) { - this.workflowApplication.Extensions.Add(extentionFunc); + this.workflowApplication.Extensions.Add(extensionFunc); } } diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJob2.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJob2.cs index 24042c838..ceb3d65ed 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJob2.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJob2.cs @@ -1327,7 +1327,7 @@ namespace Microsoft.PowerShell.Workflow internal void ConfigureWorkflowHandlers() { _workflowInstance.OnCompletedDelegate = OnWorkflowCompleted; - _workflowInstance.OnSuspenedDelegate = OnWorkflowSuspended; + _workflowInstance.OnSuspendedDelegate = OnWorkflowSuspended; _workflowInstance.OnStoppedDelegate = OnWorkflowStopped; _workflowInstance.OnAbortedDelegate = OnWorkflowAborted; _workflowInstance.OnFaultedDelegate = OnWorkflowFaulted; diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJobSourceAdapter.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJobSourceAdapter.cs index dad556bb1..7acad9290 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJobSourceAdapter.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowJobSourceAdapter.cs @@ -166,15 +166,15 @@ namespace Microsoft.PowerShell.Workflow { foreach (PSWorkflowJob job in newJob.ChildJobs) { - bool? psPersitValue = null; + bool? psPersistValue = null; PSWorkflowContext context = job.PSWorkflowInstance.PSWorkflowContext; if (context != null && context.PSWorkflowCommonParameters != null && context.PSWorkflowCommonParameters.ContainsKey(Constants.Persist)) { - psPersitValue = context.PSWorkflowCommonParameters[Constants.Persist] as bool?; + psPersistValue = context.PSWorkflowCommonParameters[Constants.Persist] as bool?; } // check for invocation time pspersist value if not true then there is a possibility that workflow is not suspendable. - if (psPersitValue == null || (psPersitValue == false)) + if (psPersistValue == null || (psPersistValue == false)) { // check for authoring time definition of persist activity if (isSuspendable != null && isSuspendable.Value == false) diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowManager.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowManager.cs index c13db8b8f..c940fa0e1 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowManager.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowManager.cs @@ -1392,8 +1392,8 @@ namespace Microsoft.PowerShell.Workflow { if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA) { - foreach (WaitHandle hanlde in waitHandles) - hanlde.WaitOne(); + foreach (WaitHandle handle in waitHandles) + handle.WaitOne(); } else { diff --git a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowPerformanceCounterSetInfo.cs b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowPerformanceCounterSetInfo.cs index a16642828..76c6a3c4b 100644 --- a/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowPerformanceCounterSetInfo.cs +++ b/src/Microsoft.PowerShell.Workflow.ServiceCore/ServiceCore/WorkflowCore/WorkflowPerformanceCounterSetInfo.cs @@ -56,7 +56,7 @@ namespace Microsoft.PowerShell.Workflow new CounterInfo(PSWorkflowPerformanceCounterIds.PSRemotingForcedToWaitRequestsQueueLength, CounterType.RawData64), new CounterInfo(PSWorkflowPerformanceCounterIds.PSRemotingConnectionsCreatedCount, CounterType.RawData64), new CounterInfo(PSWorkflowPerformanceCounterIds.PSRemotingConnectionsDisposedCount, CounterType.RawData64), - new CounterInfo(PSWorkflowPerformanceCounterIds.PSRemotingConnectionsClosedReopendCount, CounterType.RawData64) + new CounterInfo(PSWorkflowPerformanceCounterIds.PSRemotingConnectionsClosedReopenedCount, CounterType.RawData64) }; } @@ -100,7 +100,7 @@ namespace Microsoft.PowerShell.Workflow internal const int PSRemotingForcedToWaitRequestsQueueLength = PSRemotingRequestsBeingServicedCount + 1; internal const int PSRemotingConnectionsCreatedCount = PSRemotingForcedToWaitRequestsQueueLength + 1; internal const int PSRemotingConnectionsDisposedCount = PSRemotingConnectionsCreatedCount + 1; - internal const int PSRemotingConnectionsClosedReopendCount = PSRemotingConnectionsDisposedCount + 1; + internal const int PSRemotingConnectionsClosedReopenedCount = PSRemotingConnectionsDisposedCount + 1; }; From 3cdb922cf0c843270074df02f2e24d6468554bf7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 30 Aug 2016 03:53:12 +0000 Subject: [PATCH 13/29] spelling: locals in src/Microsoft.WSMan.Management --- .../ConfigProvider.cs | 30 +++++++++---------- src/Microsoft.WSMan.Management/CredSSP.cs | 10 +++---- .../NewWSManSession.cs | 8 ++--- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Microsoft.WSMan.Management/ConfigProvider.cs b/src/Microsoft.WSMan.Management/ConfigProvider.cs index 47ac71b11..0837f3678 100644 --- a/src/Microsoft.WSMan.Management/ConfigProvider.cs +++ b/src/Microsoft.WSMan.Management/ConfigProvider.cs @@ -44,7 +44,7 @@ namespace Microsoft.WSMan.Management /// /// Object contains the cache of the enumerate results for the cmdlet to execute. /// - Dictionary enumarateMapping = new Dictionary(); + Dictionary enumerateMapping = new Dictionary(); /// /// Mapping of ResourceURI with the XML returned by the Get call. @@ -406,7 +406,7 @@ namespace Microsoft.WSMan.Management if (xmlListeners != null) { Hashtable KeyCache, ListenerObjCache; - ProcessListernerObjects(xmlListeners, out ListenerObjCache, out KeyCache); + ProcessListenerObjects(xmlListeners, out ListenerObjCache, out KeyCache); if (ListenerObjCache.Count > 0) { return true; @@ -1448,7 +1448,7 @@ namespace Microsoft.WSMan.Management if (xmlListeners != null) { Hashtable KeyCache, ListenerObjCache; - ProcessListernerObjects(xmlListeners, out ListenerObjCache, out KeyCache); + ProcessListenerObjects(xmlListeners, out ListenerObjCache, out KeyCache); if (KeyCache.Contains(childname)) { return true; @@ -1962,7 +1962,7 @@ namespace Microsoft.WSMan.Management } else if (ContainerListenerOrCertMapping.Equals(WSManStringLiterals.containerListener)) { - ProcessListernerObjects(xmlResource, out CCache, out kCache); + ProcessListenerObjects(xmlResource, out CCache, out kCache); } if (CCache != null && CCache.Count > 0) { @@ -2292,7 +2292,7 @@ namespace Microsoft.WSMan.Management if (ResourceURI.EndsWith(WSManStringLiterals.containerListener, StringComparison.OrdinalIgnoreCase)) { - ProcessListernerObjects(xmlResource, out objcache, out Keyscache); + ProcessListenerObjects(xmlResource, out objcache, out Keyscache); } else if (ResourceURI.EndsWith(WSManStringLiterals.containerCertMapping, StringComparison.OrdinalIgnoreCase)) { @@ -2677,7 +2677,7 @@ namespace Microsoft.WSMan.Management { XmlDocument xmlEnumResources = null; - if (!this.enumarateMapping.TryGetValue(ResourceURI, out xmlEnumResources)) + if (!this.enumerateMapping.TryGetValue(ResourceURI, out xmlEnumResources)) { try { @@ -2696,7 +2696,7 @@ namespace Microsoft.WSMan.Management xmlEnumResources = new XmlDocument(); strXmlValue = "" + strXmlValue + ""; xmlEnumResources.LoadXml(strXmlValue); - this.enumarateMapping.Add(ResourceURI, xmlEnumResources); + this.enumerateMapping.Add(ResourceURI, xmlEnumResources); } } @@ -3604,7 +3604,7 @@ namespace Microsoft.WSMan.Management } else if (ListenerOrCerMapping.Equals(WSManStringLiterals.containerListener)) { - ProcessListernerObjects(xmlResource, out Objcache, out Keyscache); + ProcessListenerObjects(xmlResource, out Objcache, out Keyscache); } else { return; } @@ -3665,7 +3665,7 @@ namespace Microsoft.WSMan.Management Hashtable Objcache, Keyscache; if (ContainerListenerOrClientCert.Equals(WSManStringLiterals.containerListener, StringComparison.OrdinalIgnoreCase)) { - ProcessListernerObjects(xmlResource, out Objcache, out Keyscache); + ProcessListenerObjects(xmlResource, out Objcache, out Keyscache); } else if (ContainerListenerOrClientCert.Equals(WSManStringLiterals.containerClientCertificate, StringComparison.OrdinalIgnoreCase)) { @@ -3715,7 +3715,7 @@ namespace Microsoft.WSMan.Management } else { - ProcessListernerObjects(xmlresources, out ResourcesCache, out KeysCache); + ProcessListenerObjects(xmlresources, out ResourcesCache, out KeysCache); } if (KeysCache.Contains(childname)) { @@ -3950,7 +3950,7 @@ namespace Microsoft.WSMan.Management } else { - ProcessListernerObjects(outxml, out objcache, out KeysCache); + ProcessListenerObjects(outxml, out objcache, out KeysCache); } String PathChecked = host + WSManStringLiterals.DefaultPathSeparator + parentListenerOrCert; @@ -4644,7 +4644,7 @@ namespace Microsoft.WSMan.Management Keyscache = kCache; } - private void ProcessListernerObjects(XmlDocument xmlListeners, out Hashtable listenercache, out Hashtable Keyscache) + private void ProcessListenerObjects(XmlDocument xmlListeners, out Hashtable listenercache, out Hashtable Keyscache) { Hashtable lCache = new Hashtable(); Hashtable kCache = new Hashtable(); @@ -4871,11 +4871,11 @@ namespace Microsoft.WSMan.Management // ArrayList SecurityLvl = null; if (xmlSecurity != null) { - XmlNodeList nodelistSecutiry = xmlSecurity.GetElementsByTagName(WSManStringLiterals.containerSecurity); - if (nodelistSecutiry.Count > 0) + XmlNodeList nodelistSecurity = xmlSecurity.GetElementsByTagName(WSManStringLiterals.containerSecurity); + if (nodelistSecurity.Count > 0) { //SecurityLvl = new ArrayList(); - foreach (XmlElement xe in nodelistSecutiry) + foreach (XmlElement xe in nodelistSecurity) { bool ExactMatchFound = false; PSObject objSecurity = new PSObject(); diff --git a/src/Microsoft.WSMan.Management/CredSSP.cs b/src/Microsoft.WSMan.Management/CredSSP.cs index 6e1017b4e..a1d535924 100644 --- a/src/Microsoft.WSMan.Management/CredSSP.cs +++ b/src/Microsoft.WSMan.Management/CredSSP.cs @@ -440,7 +440,7 @@ namespace Microsoft.WSMan.Management //private const string DelegateComputerParam = "DelegateComputer"; //private String[] delegatecomputer; - //private RuntimeDefinedParameterDictionary dyanmicParameters = new RuntimeDefinedParameterDictionary(); + //private RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary(); #endregion @@ -544,7 +544,7 @@ namespace Microsoft.WSMan.Management // return null if the role is not client. if (!Role.Equals(ClientRole, StringComparison.OrdinalIgnoreCase)) { - return dyanmicParameters; + return dynamicParameters; } // Construct attributes for the DelegateComputer parameter @@ -561,9 +561,9 @@ namespace Microsoft.WSMan.Management DelegateComputerParam, typeof(string[]), delegateComputerAttributeCollection); - dyanmicParameters.Add(DelegateComputerParam, delegateComputer); + dynamicParameters.Add(DelegateComputerParam, delegateComputer); - return dyanmicParameters; + return dynamicParameters; } // GetDynamicParameters*/ @@ -603,7 +603,7 @@ namespace Microsoft.WSMan.Management return; } // Extract delegateComputer information from dynamic parameters collection - //RuntimeDefinedParameter delegateComputerParameter = dyanmicParameters[DelegateComputerParam]; + //RuntimeDefinedParameter delegateComputerParameter = dynamicParameters[DelegateComputerParam]; //delegatecomputer = (string[])delegateComputerParameter.Value; string newxmlcontent = @"true"; diff --git a/src/Microsoft.WSMan.Management/NewWSManSession.cs b/src/Microsoft.WSMan.Management/NewWSManSession.cs index e474a3bcc..627cdced5 100644 --- a/src/Microsoft.WSMan.Management/NewWSManSession.cs +++ b/src/Microsoft.WSMan.Management/NewWSManSession.cs @@ -41,14 +41,14 @@ namespace Microsoft.WSMan.Management { get { - return _proxyacesstype; + return _proxyaccesstype; } set { - _proxyacesstype = value; + _proxyaccesstype = value; } } - private ProxyAccessType _proxyacesstype; + private ProxyAccessType _proxyaccesstype; /// /// The following is the definition of the input parameter "ProxyAuthentication". @@ -253,7 +253,7 @@ namespace Microsoft.WSMan.Management objSessionOption.OperationTimeout = operationtimeout; objSessionOption.SkipRevocationCheck = skiprevocationcheck; //Proxy Settings - objSessionOption.ProxyAccessType = _proxyacesstype; + objSessionOption.ProxyAccessType = _proxyaccesstype; objSessionOption.ProxyAuthentication = proxyauthentication; if (noencryption) From 67c5cf8b6edacc16b500ae7f7d050317cd086278 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 13:51:21 +0000 Subject: [PATCH 14/29] spelling: locals in src/powershell-native --- src/powershell-native/nativemsh/pwrshplugin/pwrshplugindefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugindefs.h b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugindefs.h index aaea69d91..3e1ad6676 100644 --- a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugindefs.h +++ b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugindefs.h @@ -129,7 +129,7 @@ typedef struct _PwrshPluginWkr_Ptrs WSManPluginReceiveFuncPtr wsManPluginReceiveFuncPtr; WSManPluginSignalFuncPtr wsManPluginSignalFuncPtr; WSManPluginConnectFuncPtr wsManPluginConnectFuncPtr; - WSManPluginOperationShutdownFuncPtr wsmanPluingOperationShutdownFuncPtr; // This ptr is not used in this environment, but is required to keep the memory layout identical between unmanaged and managed code. + WSManPluginOperationShutdownFuncPtr wsmanPluginOperationShutdownFuncPtr; // This ptr is not used in this environment, but is required to keep the memory layout identical between unmanaged and managed code. } PwrshPluginWkr_Ptrs; class PlugInException From 6386d26a8ada9c5836b233c322a6316d9dcf7a98 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 13:52:39 +0000 Subject: [PATCH 15/29] spelling: locals in src/System.Management.Automation/utils --- src/System.Management.Automation/utils/PSTelemetryMethods.cs | 4 ++-- src/System.Management.Automation/utils/tracing/EtwActivity.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Management.Automation/utils/PSTelemetryMethods.cs b/src/System.Management.Automation/utils/PSTelemetryMethods.cs index 9d5e06a9f..bdc628269 100644 --- a/src/System.Management.Automation/utils/PSTelemetryMethods.cs +++ b/src/System.Management.Automation/utils/PSTelemetryMethods.cs @@ -44,7 +44,7 @@ namespace Microsoft.PowerShell.Telemetry.Internal private enum HostIsInteractive { Unknown, - Iteractive, + Interactive, NonInteractive } @@ -70,7 +70,7 @@ namespace Microsoft.PowerShell.Telemetry.Internal { TelemetryWrapper.TraceMessage("PSHostStart", new { - Interactive = ihptd.HostIsInteractive ? HostIsInteractive.Iteractive : HostIsInteractive.NonInteractive, + Interactive = ihptd.HostIsInteractive ? HostIsInteractive.Interactive : HostIsInteractive.NonInteractive, ProfileLoadTime = ihptd.ProfileLoadTimeInMS, ReadyForInputTime = ihptd.ReadyForInputTimeInMS, Is32Bit = is32Bit, diff --git a/src/System.Management.Automation/utils/tracing/EtwActivity.cs b/src/System.Management.Automation/utils/tracing/EtwActivity.cs index ff1e154a7..20a9352ef 100644 --- a/src/System.Management.Automation/utils/tracing/EtwActivity.cs +++ b/src/System.Management.Automation/utils/tracing/EtwActivity.cs @@ -366,8 +366,8 @@ namespace System.Management.Automation.Tracing /// public void Correlate() { - Guid parentAcitvity = GetActivityId(); - CorrelateWithActivity(parentAcitvity); + Guid parentActivity = GetActivityId(); + CorrelateWithActivity(parentActivity); } /// From b44e91e565590308a19adad36581cc5e92b1dc0f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 13:55:34 +0000 Subject: [PATCH 16/29] spelling: locals in src/System.Management.Automation/singleshell --- .../singleshell/config/MshSnapinInfo.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs index 5711e6e32..d79b4aa1c 100644 --- a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs +++ b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs @@ -501,7 +501,7 @@ namespace System.Management.Automation // PS V3 snapin information is stored under 1 registry key.. // so no need to iterate over twice. - Collection filterdVersions = new Collection(); + Collection filteredVersions = new Collection(); foreach (string version in versions) { string temp = PSVersionInfo.GetRegisteryVersionKeyForSnapinDiscovery(version); @@ -510,13 +510,13 @@ namespace System.Management.Automation temp = version; } - if (!filterdVersions.Contains(temp)) + if (!filteredVersions.Contains(temp)) { - filterdVersions.Add(temp); + filteredVersions.Add(temp); } } - foreach (string version in filterdVersions) + foreach (string version in filteredVersions) { if (string.IsNullOrEmpty(version)) { From aa929a00cec7bf3bc187cd2a0ee9a6387632f792 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:03:25 +0000 Subject: [PATCH 17/29] spelling: locals in src/System.Management.Automation/help --- .../help/CommandHelpProvider.cs | 4 ++-- .../help/HelpProviderWithCache.cs | 6 ++--- .../help/MamlUtil.cs | 10 ++++----- .../help/PSClassHelpProvider.cs | 4 ++-- .../help/SaveHelpCommand.cs | 22 +++++++++---------- .../help/UpdatableHelpSystem.cs | 6 ++--- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/System.Management.Automation/help/CommandHelpProvider.cs b/src/System.Management.Automation/help/CommandHelpProvider.cs index ce5a6911e..ff96a56e8 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 94a7a1ce7..5bf03d808 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 719a0c5d8..f4e97a74e 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 c3292024e..ef7878056 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 e81107469..3d0001845 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 1aad343e5..a8aec1a9c 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(); From e9d4582aeceafeee0d94f27114de87598f3baa3c Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:30:25 +0000 Subject: [PATCH 18/29] spelling: locals in src/System.Management.Automation/engine/runtime --- .../engine/runtime/Binding/Binders.cs | 26 +++++++++---------- .../engine/runtime/CompiledScriptBlock.cs | 12 ++++----- .../engine/runtime/Operations/ClassOps.cs | 4 +-- .../engine/runtime/Operations/MiscOps.cs | 10 +++---- .../engine/runtime/ScriptBlockToPowerShell.cs | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs index 7344696b2..ab364025a 100644 --- a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs +++ b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs @@ -336,7 +336,7 @@ namespace System.Management.Automation.Language #endif } - internal static class DynamicMetaObjectBinderExtentions + internal static class DynamicMetaObjectBinderExtensions { internal static DynamicMetaObject DeferForPSObject(this DynamicMetaObjectBinder binder, params DynamicMetaObject[] args) @@ -1723,7 +1723,7 @@ namespace System.Management.Automation.Language argIndex += 1; } - // We wrap the block of assignements in a try/catch and issue a general error message whenever the assignment fails. + // We wrap the block of assignments in a try/catch and issue a general error message whenever the assignment fails. var exception = Expression.Parameter(typeof(Exception)); var block = Expression.Block( Expression.Assign(tmp, result), @@ -2483,7 +2483,7 @@ namespace System.Management.Automation.Language // tmp = Parser.ScanNumber(arg) // if (tmp == null) { throw new RuntimeError("BadNumericConstant") } // dynamic op target tmp - // For equality comparision operators, if the conversion fails, we shouldn't raise + // For equality comparison operators, if the conversion fails, we shouldn't raise // an exception, so those must be wrapped in try/catch, like: // try { /* as above */ } // catch (InvalidCastException) { true or false (depending on Operation type) } @@ -2520,7 +2520,7 @@ namespace System.Management.Automation.Language } /// - /// Use the tokenzier to scan a number and convert it to a number of any type. + /// Use the tokenizer to scan a number and convert it to a number of any type. /// /// /// The expression that refers to a string to be converted to a number of any type. @@ -2933,7 +2933,7 @@ namespace System.Management.Automation.Language // Figure out the smallest type necessary so we don't lose information. // For uint, V2 promoted to long, but it's more correct to use uint. - // For ulong, V2 incorreclty used long, this is fixed here. + // For ulong, V2 incorrectly used long, this is fixed here. // For float, double, and decimal operands, we used to use long because V2 did. // Because we use unsigned for -bnot, to be consistent, we promote to unsigned here too (-band,-bor,-xor) opType = GetBitwiseOpType((int)leftTypeCode >= (int)rightTypeCode ? leftTypeCode : rightTypeCode); @@ -3120,7 +3120,7 @@ namespace System.Management.Automation.Language } return BinaryComparisonCommon(enumerable, target, arg) - ?? BinaryComparision(target, arg, e => Expression.LessThan(e, ExpressionCache.Constant(0))); + ?? BinaryComparison(target, arg, e => Expression.LessThan(e, ExpressionCache.Constant(0))); } private DynamicMetaObject CompareLE(DynamicMetaObject target, @@ -3140,7 +3140,7 @@ namespace System.Management.Automation.Language } return BinaryComparisonCommon(enumerable, target, arg) - ?? BinaryComparision(target, arg, e => Expression.LessThanOrEqual(e, ExpressionCache.Constant(0))); + ?? BinaryComparison(target, arg, e => Expression.LessThanOrEqual(e, ExpressionCache.Constant(0))); } private DynamicMetaObject CompareGT(DynamicMetaObject target, @@ -3162,7 +3162,7 @@ namespace System.Management.Automation.Language } return BinaryComparisonCommon(enumerable, target, arg) - ?? BinaryComparision(target, arg, e => Expression.GreaterThan(e, ExpressionCache.Constant(0))); + ?? BinaryComparison(target, arg, e => Expression.GreaterThan(e, ExpressionCache.Constant(0))); } private DynamicMetaObject CompareGE(DynamicMetaObject target, @@ -3184,10 +3184,10 @@ namespace System.Management.Automation.Language } return BinaryComparisonCommon(enumerable, target, arg) - ?? BinaryComparision(target, arg, e => Expression.GreaterThanOrEqual(e, ExpressionCache.Constant(0))); + ?? BinaryComparison(target, arg, e => Expression.GreaterThanOrEqual(e, ExpressionCache.Constant(0))); } - private DynamicMetaObject BinaryComparision(DynamicMetaObject target, DynamicMetaObject arg, Func toResult) + private DynamicMetaObject BinaryComparison(DynamicMetaObject target, DynamicMetaObject arg, Func toResult) { if (target.LimitType == typeof(string)) { @@ -5821,7 +5821,7 @@ namespace System.Management.Automation.Language } Expression transformedExpression = originalExpression.Convert(typeof(object)); var engineIntrinsicsTempVar = Expression.Variable(typeof(EngineIntrinsics)); - // apply tranformation attributes from right to left + // apply transformation attributes from right to left for (int i = attributesArray.Length - 1; i >= 0; i--) { transformedExpression = Expression.Call(Expression.Constant(attributesArray[i]), @@ -6648,7 +6648,7 @@ namespace System.Management.Automation.Language // If we're calling SteppablePipeline.{Begin|Process|End}, we don't want // to wrap exceptions - this is very much a special case to help error - // propogation and ensure errors are attributed to the correct code (the + // propagation and ensure errors are attributed to the correct code (the // cmdlet invoked, not the method call from some proxy.) if (methodInfo.DeclaringType == typeof(SteppablePipeline) && (methodInfo.Name.Equals("Begin", StringComparison.Ordinal)) @@ -6911,7 +6911,7 @@ namespace System.Management.Automation.Language /// The target to operate against /// /// Arguments to the operator. The first argument must be either a scriptblock - /// or a string representing a 'simple where' expresson. The second is an enum that controls + /// or a string representing a 'simple where' expression. The second is an enum that controls /// the matching behaviour returning the first, last or all matching elements. /// /// The binding restrictions for the arguments. diff --git a/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs b/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs index e3187675c..448b19621 100644 --- a/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs +++ b/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs @@ -259,7 +259,7 @@ namespace System.Management.Automation private bool _usesCmdletBinding; private bool _compiledOptimized; private bool _compiledUnoptimized; - private bool _hasSuspicousContent; + private bool _hasSuspiciousContent; internal bool DebuggerHidden { get; set; } internal bool DebuggerStepThrough { get; set; } internal Guid Id { get; private set; } @@ -281,9 +281,9 @@ namespace System.Management.Automation get { Diagnostics.Assert(_compiledOptimized || _compiledUnoptimized, "HasSuspiciousContent is not set correctly before being compiled"); - return _hasSuspicousContent; + return _hasSuspiciousContent; } - set { _hasSuspicousContent = value; } + set { _hasSuspiciousContent = value; } } private MergedCommandParameterMetadata _parameterMetadata; @@ -1011,7 +1011,7 @@ namespace System.Management.Automation context.LanguageMode = newLanguageMode.Value; } - args = BindArgumentsForScripblockInvoke( + args = BindArgumentsForScriptblockInvoke( (RuntimeDefinedParameter[])RuntimeDefinedParameters.Data, args, context, !createLocalScope, backupWhenDotting, locals); locals.SetAutomaticVariable(AutomaticVariable.Args, args, context); @@ -1106,7 +1106,7 @@ namespace System.Management.Automation return locals; } - internal static object[] BindArgumentsForScripblockInvoke( + internal static object[] BindArgumentsForScriptblockInvoke( RuntimeDefinedParameter[] parameters, object[] args, ExecutionContext context, @@ -1415,7 +1415,7 @@ namespace System.Management.Automation // We only do this once, as the error will always be the same for a given certificate. if (error != null) { - // If we got an error resoving the encryption certificate, log a warning and continue + // If we got an error resolving the encryption certificate, log a warning and continue // logging the (unencrypted) message anyways. Logging trumps protected logging - // being able to detect that an attacker has compromised a box outweighs the danger of the // attacker seeing potentially sensitive data. Because if they aren't detected, then diff --git a/src/System.Management.Automation/engine/runtime/Operations/ClassOps.cs b/src/System.Management.Automation/engine/runtime/Operations/ClassOps.cs index 94aaa52d3..6fb1d9d8b 100644 --- a/src/System.Management.Automation/engine/runtime/Operations/ClassOps.cs +++ b/src/System.Management.Automation/engine/runtime/Operations/ClassOps.cs @@ -13,7 +13,7 @@ using System.Management.Automation.Language; using System.Threading; // These APIs are not part of the public contract. -// They are implementation details and intendent to be called from generated assemlbies for PS classes. +// They are implementation details and intended to be called from generated assemblies for PS classes. // // Because they are called from other assemblies, we have to make them public. // We put them in Internal namespace to emphasise that despite the fact that they are public, it's not part of API contract. @@ -27,7 +27,7 @@ namespace System.Management.Automation.Internal /// In the former case, module can be imported from the different runspaces in the same process. /// And so runspaces will share RuntimeType. But in every runspace, Type is associated with just one SessionState. /// We want type methods to be able access $script: variables and module-specific methods. - /// To achive it, we preserve reference to SessionState that creates type in the private field 'SessionStateFieldName'. + /// To achieve it, we preserve reference to SessionState that creates type in the private field 'SessionStateFieldName'. /// Later, we use it to call scriptBlocks captured in ScriptBlockMemberMethodWrapper with the right sessionState. /// public class SessionStateKeeper diff --git a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs index 109be05eb..8c4144326 100644 --- a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs +++ b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs @@ -520,7 +520,7 @@ namespace System.Management.Automation var locals = MutableTuple.MakeTuple(Compiler.DottedLocalsTupleType, Compiler.DottedLocalsNameIndexMap); object[] remainingArgs = - ScriptBlock.BindArgumentsForScripblockInvoke( + ScriptBlock.BindArgumentsForScriptblockInvoke( (RuntimeDefinedParameter[])scriptBlock.RuntimeDefinedParameters.Data, args, context, false, null, locals); locals.SetAutomaticVariable(AutomaticVariable.Args, remainingArgs, context); @@ -576,7 +576,7 @@ namespace System.Management.Automation // For nicer error reporting, we want to make it look like errors in the steppable pipeline point back to // the caller of the proxy. We don't want errors pointing to the script block created in the proxy. - // Here we assume (in a safe way) that GetSteppablePipline is called from script. If that isn't the case, + // Here we assume (in a safe way) that GetSteppablePipeline is called from script. If that isn't the case, // we won't crash, but the error reporting might be a little misleading. var callStack = context.Debugger.GetCallStack().ToArray(); if (callStack.Length > 0 && Regex.IsMatch(callStack[0].Position.Text, "GetSteppablePipeline", RegexOptions.IgnoreCase)) @@ -1538,7 +1538,7 @@ namespace System.Management.Automation /// The execution context /// The preference the user selected /// - /// Error action is decided by error action preference. If preferenc is inquire, we will + /// Error action is decided by error action preference. If preference is inquire, we will /// prompt user for their preference. /// internal static ActionPreference QueryForAction(RuntimeException rte, string message, ExecutionContext context) @@ -2488,8 +2488,8 @@ namespace System.Management.Automation var context = Runspace.DefaultRunspace.ExecutionContext; // If expression argument is a .Net type then convert the collection to that type - // if the target type is a collecton or array, then the result will be a collection of exactly - // that type. If the target type is not a collectiom type then return a generic collection of that type. + // if the target type is a collection or array, then the result will be a collection of exactly + // that type. If the target type is not a collection type then return a generic collection of that type. Type targetType = expression as Type; if (targetType != null) { diff --git a/src/System.Management.Automation/engine/runtime/ScriptBlockToPowerShell.cs b/src/System.Management.Automation/engine/runtime/ScriptBlockToPowerShell.cs index 7115ad6bb..8803e3cbf 100644 --- a/src/System.Management.Automation/engine/runtime/ScriptBlockToPowerShell.cs +++ b/src/System.Management.Automation/engine/runtime/ScriptBlockToPowerShell.cs @@ -288,7 +288,7 @@ namespace System.Management.Automation var parameters = functionParameters != null ? Compiler.GetParameterMetaData(functionParameters, true, ref usesCmdletBinding) : ((IParameterMetadataProvider)body).GetParameterMetadata(true, ref usesCmdletBinding); - object[] remainingArgs = ScriptBlock.BindArgumentsForScripblockInvoke( + object[] remainingArgs = ScriptBlock.BindArgumentsForScriptblockInvoke( (RuntimeDefinedParameter[])parameters.Data, args, context, false, null, locals); locals.SetAutomaticVariable(AutomaticVariable.Args, remainingArgs, context); newScope.LocalsTuple = locals; From a398315a870118e61bd048345aeac38b223765cf Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Fri, 2 Sep 2016 16:21:20 +0000 Subject: [PATCH 19/29] spelling: locals in src/System.Management.Automation/engine/remoting --- .../engine/remoting/client/Job2.cs | 4 +-- .../engine/remoting/client/PSProxyJob.cs | 14 ++++---- .../client/RemoteRunspacePoolInternal.cs | 2 +- .../remoting/client/RemotingProtocol2.cs | 10 +++--- .../engine/remoting/client/RunspaceRef.cs | 6 ++-- .../engine/remoting/client/remoterunspace.cs | 30 ++++++++--------- .../remoting/commands/ConnectPSSession.cs | 16 +++++----- .../remoting/commands/CustomShellCommands.cs | 14 ++++---- .../commands/NewPSSessionConfigurationFile.cs | 6 ++-- .../engine/remoting/commands/WaitJob.cs | 8 ++--- .../remoting/commands/newrunspacecommand.cs | 6 ++-- .../remoting/common/RemoteSessionNamedPipe.cs | 10 +++--- .../remoting/common/RunspaceConnectionInfo.cs | 2 +- .../remoting/fanin/BaseTransportManager.cs | 6 ++-- .../fanin/InitialSessionStateProvider.cs | 32 +++++++++---------- .../fanin/OutOfProcTransportManager.cs | 4 +-- .../remoting/fanin/PriorityCollection.cs | 12 +++---- .../engine/remoting/fanin/WSManNativeAPI.cs | 2 +- .../engine/remoting/fanin/WSManPlugin.cs | 8 ++--- .../remoting/fanin/WSManPluginShellSession.cs | 12 +++---- .../fanin/WSManPluginTransportManager.cs | 4 +-- .../remoting/fanin/WSManTransportManager.cs | 28 ++++++++-------- .../server/ServerRunspacePoolDriver.cs | 4 +-- .../server/ServerSteppablePipelineDriver.cs | 10 +++--- .../remoting/server/serverremotesession.cs | 2 +- .../server/serverremotesessionstatemachine.cs | 4 +-- .../serverremotingprotocolimplementation.cs | 4 +-- 27 files changed, 130 insertions(+), 130 deletions(-) diff --git a/src/System.Management.Automation/engine/remoting/client/Job2.cs b/src/System.Management.Automation/engine/remoting/client/Job2.cs index 14113c99f..8300434d0 100644 --- a/src/System.Management.Automation/engine/remoting/client/Job2.cs +++ b/src/System.Management.Automation/engine/remoting/client/Job2.cs @@ -873,9 +873,9 @@ namespace System.Management.Automation // Check to see expected behavior if one child job fails to start. } - if (ExcecutionError.Count == 1) + if (ExecutionError.Count == 1) { - throw ExcecutionError[0]; + throw ExecutionError[0]; } */ _tracer.WriteMessage(TraceClassName, "StartJob", Guid.Empty, this, "Exiting method", null); } diff --git a/src/System.Management.Automation/engine/remoting/client/PSProxyJob.cs b/src/System.Management.Automation/engine/remoting/client/PSProxyJob.cs index a445fd3ec..0c43bd36e 100644 --- a/src/System.Management.Automation/engine/remoting/client/PSProxyJob.cs +++ b/src/System.Management.Automation/engine/remoting/client/PSProxyJob.cs @@ -397,7 +397,7 @@ namespace System.Management.Automation // in the same invocation. Return once the job object is returned and // used to initialize the proxy. DoStartAsync(dataAdded, stateChanged, input); - _jobInitialiedWaitHandle.WaitOne(); + _jobInitializedWaitHandle.WaitOne(); } catch (Exception error) { @@ -1344,7 +1344,7 @@ namespace System.Management.Automation // remove it. // Do this within the Try/Finally block so that the wait handle will be set // on exit. - _jobInitialiedWaitHandle.WaitOne(); + _jobInitializedWaitHandle.WaitOne(); if (_remoteJobInstanceId == Guid.Empty) return; // Stop the receive-job command if it's in progress. @@ -1567,7 +1567,7 @@ namespace System.Management.Automation JobSuspendedOrFinished.Set(); OnSuspendJobCompleted(new AsyncCompletedEventArgs(e.JobStateInfo.Reason, false, null)); - _jobInitialiedWaitHandle.Set(); + _jobInitializedWaitHandle.Set(); OnStartJobCompleted(new AsyncCompletedEventArgs(e.JobStateInfo.Reason, false, null)); OnStopJobCompleted(new AsyncCompletedEventArgs(e.JobStateInfo.Reason, false, null)); @@ -2058,7 +2058,7 @@ namespace System.Management.Automation ? PSTraceSource.NewNotSupportedException(PowerShellStrings.CommandDoesNotWriteJob) : _receivePowerShell.Streams.Error[0].Exception; DoSetJobState(JobState.Failed, reason); - _jobInitialiedWaitHandle.Set(); + _jobInitializedWaitHandle.Set(); OnStartJobCompleted(new AsyncCompletedEventArgs(reason, false, null)); return; } @@ -2079,7 +2079,7 @@ namespace System.Management.Automation } // Release any thread waiting start. - _jobInitialiedWaitHandle.Set(); + _jobInitializedWaitHandle.Set(); _tracer.WriteMessage(ClassNameTrace, "DataAddedToOutput", Guid.Empty, this, "BEGIN Invoke StartJobCompleted event", null); OnStartJobCompleted(new AsyncCompletedEventArgs(null, false, null)); @@ -2377,7 +2377,7 @@ namespace System.Management.Automation if (_removeComplete != null) _removeComplete.Dispose(); if (_jobRunningOrFinished != null) _jobRunningOrFinished.Dispose(); - _jobInitialiedWaitHandle.Dispose(); + _jobInitializedWaitHandle.Dispose(); if (_jobSuspendedOrFinished != null) _jobSuspendedOrFinished.Dispose(); if (ChildJobs != null && ChildJobs.Count > 0) @@ -2448,7 +2448,7 @@ namespace System.Management.Automation } } - private readonly ManualResetEvent _jobInitialiedWaitHandle = new ManualResetEvent(false); + private readonly ManualResetEvent _jobInitializedWaitHandle = new ManualResetEvent(false); private ManualResetEvent _jobSuspendedOrFinished; private ManualResetEvent JobSuspendedOrFinished diff --git a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs index c30f9499c..7012291cf 100644 --- a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs +++ b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs @@ -179,7 +179,7 @@ namespace System.Management.Automation.Runspaces.Internal new EventHandler>(HandleSessionClosing); DataStructureHandler.SessionClosed += new EventHandler>(HandleSessionClosed); - DataStructureHandler.SetMaxMinRunspacesResponseRecieved += + DataStructureHandler.SetMaxMinRunspacesResponseReceived += new EventHandler>(HandleResponseReceived); DataStructureHandler.URIRedirectionReported += new EventHandler>(HandleURIDirectionReported); diff --git a/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs b/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs index 880bdf776..36f4628a6 100644 --- a/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs +++ b/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs @@ -180,10 +180,10 @@ namespace System.Management.Automation.Internal case RemotingDataType.RunspacePoolOperationResponse: { - Dbg.Assert(SetMaxMinRunspacesResponseRecieved != null, + Dbg.Assert(SetMaxMinRunspacesResponseReceived != null, "RemoteRunspacePoolInternal should subscribe to all data structure handler events"); - SetMaxMinRunspacesResponseRecieved.SafeInvoke(this, new RemoteDataEventArgs(receivedData.Data)); + SetMaxMinRunspacesResponseReceived.SafeInvoke(this, new RemoteDataEventArgs(receivedData.Data)); } break; @@ -209,12 +209,12 @@ namespace System.Management.Automation.Internal internal ClientPowerShellDataStructureHandler CreatePowerShellDataStructureHandler( ClientRemotePowerShell shell) { - BaseClientCommandTransportManager clientTrsptMgr = + BaseClientCommandTransportManager clientTransportMgr = RemoteSession.SessionDataStructureHandler. CreateClientCommandTransportManager(shell, shell.NoInput); return new ClientPowerShellDataStructureHandler( - clientTrsptMgr, _clientRunspacePoolId, shell.InstanceId); + clientTransportMgr, _clientRunspacePoolId, shell.InstanceId); } /// @@ -397,7 +397,7 @@ namespace System.Management.Automation.Internal /// Event raised when a response to a SetMaxRunspaces or SetMinRunspaces call /// is received /// - internal event EventHandler> SetMaxMinRunspacesResponseRecieved; + internal event EventHandler> SetMaxMinRunspacesResponseReceived; /// /// EventHandler used to report connection URI redirections to the application diff --git a/src/System.Management.Automation/engine/remoting/client/RunspaceRef.cs b/src/System.Management.Automation/engine/remoting/client/RunspaceRef.cs index 7c9ed5f97..2c39d972d 100644 --- a/src/System.Management.Automation/engine/remoting/client/RunspaceRef.cs +++ b/src/System.Management.Automation/engine/remoting/client/RunspaceRef.cs @@ -118,7 +118,7 @@ namespace System.Management.Automation.Remoting // Fall-back to traditional approach if runspace is not pushed. if (!this.IsRunspaceOverridden) { - return CreatePsCommandNotOverriden(line, isScript, useNewScope); + return CreatePsCommandNotOverridden(line, isScript, useNewScope); } // Try to parse commands as script-block. @@ -127,7 +127,7 @@ namespace System.Management.Automation.Remoting // If that didn't work fall back to traditional approach. if (psCommand == null) { - return CreatePsCommandNotOverriden(line, isScript, useNewScope); + return CreatePsCommandNotOverridden(line, isScript, useNewScope); } // Otherwise return the psCommandCollection we got. @@ -137,7 +137,7 @@ namespace System.Management.Automation.Remoting /// /// Creates the PSCommand when the runspace is not overridden /// - private PSCommand CreatePsCommandNotOverriden(string line, bool isScript, bool? useNewScope) + private PSCommand CreatePsCommandNotOverridden(string line, bool isScript, bool? useNewScope) { PSCommand command = new PSCommand(); diff --git a/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs b/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs index 5f0b22c64..a3590fcef 100644 --- a/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs +++ b/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs @@ -999,13 +999,13 @@ namespace System.Management.Automation private void UpdatePoolDisconnectOptions() { WSManConnectionInfo runspaceWSManConnectionInfo = RunspacePool.ConnectionInfo as WSManConnectionInfo; - WSManConnectionInfo wsManconnectionInfo = ConnectionInfo as WSManConnectionInfo; + WSManConnectionInfo wsManConnectionInfo = ConnectionInfo as WSManConnectionInfo; Dbg.Assert(runspaceWSManConnectionInfo != null, "Disconnect-Connect feature is currently only supported for WSMan transport"); - Dbg.Assert(wsManconnectionInfo != null, "Disconnect-Connect feature is currently only supported for WSMan transport"); + Dbg.Assert(wsManConnectionInfo != null, "Disconnect-Connect feature is currently only supported for WSMan transport"); - runspaceWSManConnectionInfo.IdleTimeout = wsManconnectionInfo.IdleTimeout; - runspaceWSManConnectionInfo.OutputBufferingMode = wsManconnectionInfo.OutputBufferingMode; + runspaceWSManConnectionInfo.IdleTimeout = wsManConnectionInfo.IdleTimeout; + runspaceWSManConnectionInfo.OutputBufferingMode = wsManConnectionInfo.OutputBufferingMode; } #endregion @@ -2617,7 +2617,7 @@ namespace System.Management.Automation _runspace = runspace; } - private Exception _isInNoLangugeModeException = null; + private Exception _isInNoLanguageModeException = null; private Exception _getVariableCommandNotFoundException = null; private Exception _setVariableCommandNotFoundException = null; @@ -2778,8 +2778,8 @@ namespace System.Management.Automation { // Verify the runspace has is not in NoLanguage mode. For performance, throw if we got an error // before. - if (_isInNoLangugeModeException != null) - throw _isInNoLangugeModeException; + if (_isInNoLanguageModeException != null) + throw _isInNoLanguageModeException; // Since these are implemented as pipelines, we don't need to do our own // locking of sessionStateCallInProgress like we do with local runspaces. @@ -2798,8 +2798,8 @@ namespace System.Management.Automation { if (e.ErrorRecord.CategoryInfo.Category == ErrorCategory.ParserError) { - _isInNoLangugeModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); - throw _isInNoLangugeModeException; + _isInNoLanguageModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); + throw _isInNoLanguageModeException; } else throw; } @@ -2825,8 +2825,8 @@ namespace System.Management.Automation { // Verify the runspace has is not in NoLanguage mode. For performance, throw if we got an error // before. - if (_isInNoLangugeModeException != null) - throw _isInNoLangugeModeException; + if (_isInNoLanguageModeException != null) + throw _isInNoLanguageModeException; // Since these are implemented as pipelines, we don't need to do our own // locking of sessionStateCallInProgress like we do with local runspaces. @@ -2845,8 +2845,8 @@ namespace System.Management.Automation { if (e.ErrorRecord.CategoryInfo.Category == ErrorCategory.ParserError) { - _isInNoLangugeModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); - throw _isInNoLangugeModeException; + _isInNoLanguageModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); + throw _isInNoLanguageModeException; } else throw; } @@ -2891,7 +2891,7 @@ namespace System.Management.Automation { // Verify the runspace has is not in NoLanguage mode. For performance, return our // cached value if we got an error before. - if (_isInNoLangugeModeException != null) + if (_isInNoLanguageModeException != null) return PSLanguageMode.NoLanguage; // Since these are implemented as pipelines, we don't need to do our own @@ -2909,7 +2909,7 @@ namespace System.Management.Automation { if (e.ErrorRecord.CategoryInfo.Category == ErrorCategory.ParserError) { - _isInNoLangugeModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); + _isInNoLanguageModeException = new PSNotSupportedException(RunspaceStrings.NotSupportedOnRestrictedRunspace, e); return PSLanguageMode.NoLanguage; } else throw; diff --git a/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs b/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs index 3ed0615c8..a24789b5f 100644 --- a/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs +++ b/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs @@ -1129,7 +1129,7 @@ namespace Microsoft.PowerShell.Commands int throttleLimit, SessionFilterState filterState, Guid[] matchIds, string[] matchNames, string configurationName) { - Collection filteredPSSesions = new Collection(); + Collection filteredPSSessions = new Collection(); // Create a query operation for each connection information object. foreach (WSManConnectionInfo connectionInfo in connectionInfos) @@ -1210,25 +1210,25 @@ namespace Microsoft.PowerShell.Commands { if (TestRunspaceState(existingPSSession.Runspace, filterState)) { - filteredPSSesions.Add(existingPSSession); + filteredPSSessions.Add(existingPSSession); } } else if (TestRunspaceState(runspace, filterState)) { - filteredPSSesions.Add(new PSSession(runspace as RemoteRunspace)); + filteredPSSessions.Add(new PSSession(runspace as RemoteRunspace)); } } } } // Return only PSSessions that match provided Ids or Names. - if ((matchIds != null) && (filteredPSSesions.Count > 0)) + if ((matchIds != null) && (filteredPSSessions.Count > 0)) { Collection matchIdsSessions = new Collection(); foreach (Guid id in matchIds) { bool matchFound = false; - foreach (PSSession psSession in filteredPSSesions) + foreach (PSSession psSession in filteredPSSessions) { if (_stopProcessing) { @@ -1255,14 +1255,14 @@ namespace Microsoft.PowerShell.Commands // Return all found sessions. return matchIdsSessions; } - else if ((matchNames != null) && (filteredPSSesions.Count > 0)) + else if ((matchNames != null) && (filteredPSSessions.Count > 0)) { Collection matchNamesSessions = new Collection(); foreach (string name in matchNames) { WildcardPattern namePattern = WildcardPattern.Get(name, WildcardOptions.IgnoreCase); bool matchFound = false; - foreach (PSSession psSession in filteredPSSesions) + foreach (PSSession psSession in filteredPSSessions) { if (_stopProcessing) { @@ -1290,7 +1290,7 @@ namespace Microsoft.PowerShell.Commands else { // Return all collected sessions. - return filteredPSSesions; + return filteredPSSessions; } } diff --git a/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs b/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs index 90f78e1e2..e03727ed3 100644 --- a/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs +++ b/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs @@ -2952,8 +2952,8 @@ Set-SessionPluginQuota $args[0] "; private const string setSessionConfigurationTimeoutQuotasSbFormat = @" -function Set-SessionPluginIdleTimeoutQuotas([int] $maxIdleTimeoutms, [int] $idleTimeoutms, [bool] $setMaxIdleTimoutFirst) {{ - if ($setMaxIdleTimoutFirst) {{ +function Set-SessionPluginIdleTimeoutQuotas([int] $maxIdleTimeoutms, [int] $idleTimeoutms, [bool] $setMaxIdleTimeoutFirst) {{ + if ($setMaxIdleTimeoutFirst) {{ set-item -WarningAction SilentlyContinue 'WSMan:\localhost\Plugin\{0}\Quotas\MaxIdleTimeoutms' -Value $maxIdleTimeoutms -confirm:$false set-item -WarningAction SilentlyContinue 'WSMan:\localhost\Plugin\{0}\Quotas\IdleTimeoutms' -Value $idleTimeoutms -confirm:$false }} @@ -3571,7 +3571,7 @@ Set-PSSessionConfiguration $args[0] $args[1] $args[2] $args[3] $args[4] $args[5] if (idleTimeOut != 0 && quotas.ContainsKey(WSManConfigurationOption.AttribMaxIdleTimeout)) { - bool setMaxIdleTimoutFirst = true; + bool setMaxIdleTimeoutFirst = true; int maxIdleTimeOut; if (LanguagePrimitives.TryConvertTo(quotas[WSManConfigurationOption.AttribMaxIdleTimeout], out maxIdleTimeOut)) @@ -3594,7 +3594,7 @@ Set-PSSessionConfiguration $args[0] $args[1] $args[2] $args[3] $args[4] $args[5] if (currentIdleTimeoutms >= maxIdleTimeOut && currentIdleTimeoutms >= idleTimeOut) { - setMaxIdleTimoutFirst = false; + setMaxIdleTimeoutFirst = false; } } @@ -3609,7 +3609,7 @@ Set-PSSessionConfiguration $args[0] $args[1] $args[2] $args[3] $args[4] $args[5] dollarUnder: AutomationNull.Value, input: Utils.EmptyArray(), scriptThis: AutomationNull.Value, - args: new object[] { maxIdleTimeOut, idleTimeOut, setMaxIdleTimoutFirst }); + args: new object[] { maxIdleTimeOut, idleTimeOut, setMaxIdleTimeoutFirst }); // Remove Idle timeout values as we have set them above // @@ -4410,7 +4410,7 @@ $_ | Enable-PSSessionConfiguration -force $args[0] -sddl $args[1] -isSDDLSpecifi string qcCaptionMessage = StringUtil.Format(RemotingErrorIdStrings.EcsWSManQCCaption); string qcQueryMessage = StringUtil.Format(RemotingErrorIdStrings.EcsWSManQCQuery, setWSManConfigCommand); - string qcShoudProcessDesc = StringUtil.Format(RemotingErrorIdStrings.EcsWSManShouldProcessDesc, setWSManConfigCommand); + string qcShouldProcessDesc = StringUtil.Format(RemotingErrorIdStrings.EcsWSManShouldProcessDesc, setWSManConfigCommand); string setCaptionMessage = StringUtil.Format(RemotingErrorIdStrings.CSShouldProcessAction, "Set-PSSessionConfiguration"); string setQueryMessage = RemotingErrorIdStrings.EcsShouldProcessTarget; @@ -4434,7 +4434,7 @@ $_ | Enable-PSSessionConfiguration -force $args[0] -sddl $args[1] -isSDDLSpecifi qcCaptionMessage, whatIf, confirm, - qcShoudProcessDesc, + qcShouldProcessDesc, setEnabledTarget, setEnabledAction, _skipNetworkProfileCheck, diff --git a/src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs b/src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs index b3d474b04..a6d1eff81 100644 --- a/src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs +++ b/src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs @@ -1915,7 +1915,7 @@ namespace Microsoft.PowerShell.Commands { for (int i = 0; i < values.Length;) { - WriteRequriedGroup(values[i++], sb); + WriteRequiredGroup(values[i++], sb); if (i < values.Length) { @@ -1925,7 +1925,7 @@ namespace Microsoft.PowerShell.Commands } else { - WriteRequriedGroup(keyObject, sb); + WriteRequiredGroup(keyObject, sb); } sb.Append(" }"); @@ -1933,7 +1933,7 @@ namespace Microsoft.PowerShell.Commands return sb.ToString(); } - private static void WriteRequriedGroup(object value, StringBuilder sb) + private static void WriteRequiredGroup(object value, StringBuilder sb) { string strValue = value as string; if (strValue != null) diff --git a/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs b/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs index afe99acb8..f65e2fc3f 100644 --- a/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs @@ -93,7 +93,7 @@ namespace Microsoft.PowerShell.Commands } } - private void InvokeEndProcesingAction() + private void InvokeEndProcessingAction() { _endProcessingActionIsReady.Wait(); @@ -270,7 +270,7 @@ namespace Microsoft.PowerShell.Commands } } - private void CleanUpTimoutTracking() + private void CleanUpTimeoutTracking() { lock (_timerLock) { @@ -346,7 +346,7 @@ namespace Microsoft.PowerShell.Commands protected override void EndProcessing() { this.StartJobChangesTracking(); - this.InvokeEndProcesingAction(); + this.InvokeEndProcessingAction(); if (_warnNotTerminal) { WriteWarning(RemotingErrorIdStrings.JobSuspendedDisconnectedWaitWithForce); @@ -420,7 +420,7 @@ namespace Microsoft.PowerShell.Commands { _isDisposed = true; - this.CleanUpTimoutTracking(); + this.CleanUpTimeoutTracking(); this.CleanUpJobChangesTracking(); this.CleanUpEndProcessing(); // <- has to be last } diff --git a/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs b/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs index 79cfad1bd..2ce90e0af 100644 --- a/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs @@ -487,9 +487,9 @@ namespace Microsoft.PowerShell.Commands } // add host identification information in data structure handler message - PSRemotingDataStructureException protoExeption = reason as PSRemotingDataStructureException; + PSRemotingDataStructureException protoException = reason as PSRemotingDataStructureException; - if (protoExeption != null) + if (protoException != null) { OpenRunspaceOperation senderAsOp = sender as OpenRunspaceOperation; @@ -497,7 +497,7 @@ namespace Microsoft.PowerShell.Commands { String host = senderAsOp.OperatedRunspace.ConnectionInfo.ComputerName; - errorDetails = "[" + host + "] " + protoExeption.Message; + errorDetails = "[" + host + "] " + protoException.Message; } } diff --git a/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs b/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs index 2f79834f2..807927f50 100644 --- a/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs +++ b/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs @@ -169,7 +169,7 @@ namespace System.Management.Automation.Remoting internal const uint TRUNCATE_EXISTING = 5; internal const uint SECURITY_IMPERSONATIONLEVEL_ANONYMOUS = 0; - internal const uint SECURITY_IMPERSONATIONLEVEL_IDENTIFCATION = 1; + internal const uint SECURITY_IMPERSONATIONLEVEL_IDENTIFICATION = 1; internal const uint SECURITY_IMPERSONATIONLEVEL_IMPERSONATION = 2; internal const uint SECURITY_IMPERSONATIONLEVEL_DELEGATION = 3; @@ -579,10 +579,10 @@ namespace System.Management.Automation.Remoting IsListenerRunning = true; // Create listener thread. - Thread listenterThread = new Thread(ProcessListeningThread); - listenterThread.Name = _threadName; - listenterThread.IsBackground = true; - listenterThread.Start(clientConnectCallback); + Thread listenerThread = new Thread(ProcessListeningThread); + listenerThread.Name = _threadName; + listenerThread.IsBackground = true; + listenerThread.Start(clientConnectCallback); } // Lock _syncObject. } diff --git a/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs b/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs index b016a4cd6..087196baf 100644 --- a/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs +++ b/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs @@ -2710,7 +2710,7 @@ namespace System.Management.Automation.Runspaces string processParameters, ref HCS_PROCESS_INFORMATION processInformation, ref IntPtr process, - ref string reslt); + ref string result); [DllImport(PinvokeDllNames.CreateProcessInComputeSystemDllName, SetLastError = true, CharSet = CharSet.Unicode)] internal static extern uint HcsOpenProcess( diff --git a/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs index 2862f3383..b1dd8ca64 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs @@ -1229,7 +1229,7 @@ namespace System.Management.Automation.Remoting.Server // the following variable are used by onDataAvailableCallback. private bool _shouldFlushData; private bool _reportAsPending; - private Guid _runpacePoolInstanceId; + private Guid _runspacePoolInstanceId; private Guid _powerShellInstanceId; private RemotingDataType _dataType; private RemotingTargetInterface _targetInterface; @@ -1319,7 +1319,7 @@ namespace System.Management.Automation.Remoting.Server { _shouldFlushData = flush; _reportAsPending = reportPending; - _runpacePoolInstanceId = dataToBeSent.RunspacePoolId; + _runspacePoolInstanceId = dataToBeSent.RunspacePoolId; _powerShellInstanceId = dataToBeSent.PowerShellId; _dataType = dataToBeSent.DataType; _targetInterface = dataToBeSent.TargetInterface; @@ -1352,7 +1352,7 @@ namespace System.Management.Automation.Remoting.Server // log to crimson log. PSEtwLog.LogAnalyticInformational(PSEventId.ServerSendData, PSOpcode.Send, PSTask.None, PSKeyword.Transport | PSKeyword.UseAlwaysAnalytic, - _runpacePoolInstanceId.ToString(), + _runspacePoolInstanceId.ToString(), _powerShellInstanceId.ToString(), dataToSend.Length.ToString(CultureInfo.InvariantCulture), (UInt32)_dataType, diff --git a/src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs b/src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs index 03a7e9a4c..5999eb4d5 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs @@ -969,19 +969,19 @@ namespace System.Management.Automation.Remoting new ConfigTypeEntry(Copyright, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), new ConfigTypeEntry(Description, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), new ConfigTypeEntry(EnforceInputParameterValidation,new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)), - new ConfigTypeEntry(EnvironmentVariables, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValiationCallback)), + new ConfigTypeEntry(EnvironmentVariables, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)), new ConfigTypeEntry(ExecutionPolicy, new ConfigTypeEntry.TypeValidationCallback(ExecutionPolicyValidationCallback)), new ConfigTypeEntry(FormatsToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)), new ConfigTypeEntry(FunctionDefinitions, new ConfigTypeEntry.TypeValidationCallback(FunctionDefinitionsTypeValidationCallback)), new ConfigTypeEntry(GMSAAccount, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), new ConfigTypeEntry(Guid, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), - new ConfigTypeEntry(LanguageMode, new ConfigTypeEntry.TypeValidationCallback(LanugageModeValidationCallback)), + new ConfigTypeEntry(LanguageMode, new ConfigTypeEntry.TypeValidationCallback(LanguageModeValidationCallback)), new ConfigTypeEntry(ModulesToImport, new ConfigTypeEntry.TypeValidationCallback(StringOrHashtableArrayTypeValidationCallback)), new ConfigTypeEntry(MountUserDrive, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)), new ConfigTypeEntry(PowerShellVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), - new ConfigTypeEntry(RequiredGroups, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValiationCallback)), + new ConfigTypeEntry(RequiredGroups, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)), new ConfigTypeEntry(RoleCapabilities, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)), - new ConfigTypeEntry(RoleDefinitions, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValiationCallback)), + new ConfigTypeEntry(RoleDefinitions, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)), new ConfigTypeEntry(RunAsVirtualAccount, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)), new ConfigTypeEntry(RunAsVirtualAccountGroups, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)), new ConfigTypeEntry(SchemaVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)), @@ -1070,7 +1070,7 @@ namespace System.Management.Automation.Remoting /// /// /// - private static bool LanugageModeValidationCallback(string key, object obj, PSCmdlet cmdlet, string path) + private static bool LanguageModeValidationCallback(string key, object obj, PSCmdlet cmdlet, string path) { string value = obj as string; @@ -1134,7 +1134,7 @@ namespace System.Management.Automation.Remoting /// /// /// - private static bool HashtableTypeValiationCallback(string key, object obj, PSCmdlet cmdlet, string path) + private static bool HashtableTypeValidationCallback(string key, object obj, PSCmdlet cmdlet, string path) { Hashtable hash = obj as Hashtable; @@ -1935,10 +1935,10 @@ namespace System.Management.Automation.Remoting // Create the initial session state string initialSessionState = TryGetValue(_configHash, ConfigFileConstants.SessionType); SessionType sessionType = SessionType.Default; - bool cmdletVisibilityApplied = IsNonDefaultVisibiltySpecified(ConfigFileConstants.VisibleCmdlets); - bool functionVisiblityApplied = IsNonDefaultVisibiltySpecified(ConfigFileConstants.VisibleFunctions); - bool aliasVisibilityApplied = IsNonDefaultVisibiltySpecified(ConfigFileConstants.VisibleAliases); - bool providerVisibiltyApplied = IsNonDefaultVisibiltySpecified(ConfigFileConstants.VisibleProviders); + bool cmdletVisibilityApplied = IsNonDefaultVisibilitySpecified(ConfigFileConstants.VisibleCmdlets); + bool functionVisibilityApplied = IsNonDefaultVisibilitySpecified(ConfigFileConstants.VisibleFunctions); + bool aliasVisibilityApplied = IsNonDefaultVisibilitySpecified(ConfigFileConstants.VisibleAliases); + bool providerVisibilityApplied = IsNonDefaultVisibilitySpecified(ConfigFileConstants.VisibleProviders); bool processDefaultSessionStateVisibility = false; if (!String.IsNullOrEmpty(initialSessionState)) @@ -1965,8 +1965,8 @@ namespace System.Management.Automation.Remoting processDefaultSessionStateVisibility = true; } - if (cmdletVisibilityApplied || functionVisiblityApplied || aliasVisibilityApplied || providerVisibiltyApplied || - IsNonDefaultVisibiltySpecified(ConfigFileConstants.VisibleExternalCommands)) + if (cmdletVisibilityApplied || functionVisibilityApplied || aliasVisibilityApplied || providerVisibilityApplied || + IsNonDefaultVisibilitySpecified(ConfigFileConstants.VisibleExternalCommands)) { iss.DefaultCommandVisibility = SessionStateEntryVisibility.Private; @@ -1982,7 +1982,7 @@ namespace System.Management.Automation.Remoting } // Add providers - if (providerVisibiltyApplied) + if (providerVisibilityApplied) { string[] providers = TryGetStringArray(_configHash[ConfigFileConstants.VisibleProviders]); @@ -2167,7 +2167,7 @@ namespace System.Management.Automation.Remoting { foreach (Hashtable function in functions) { - SessionStateFunctionEntry entry = CreateSessionStateFunctionEntry(function, functionVisiblityApplied); + SessionStateFunctionEntry entry = CreateSessionStateFunctionEntry(function, functionVisibilityApplied); if (entry != null) { @@ -2317,7 +2317,7 @@ namespace System.Management.Automation.Remoting } // Now apply visibility logic - if (cmdletVisibilityApplied || functionVisiblityApplied || aliasVisibilityApplied || providerVisibiltyApplied) + if (cmdletVisibilityApplied || functionVisibilityApplied || aliasVisibilityApplied || providerVisibilityApplied) { if (sessionType == SessionType.Default) { @@ -2723,7 +2723,7 @@ namespace System.Management.Automation.Remoting /// /// /// - private bool IsNonDefaultVisibiltySpecified(string configFileKey) + private bool IsNonDefaultVisibilitySpecified(string configFileKey) { if (_configHash.ContainsKey(configFileKey)) { diff --git a/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs index dfbc1138d..795c69044 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/OutOfProcTransportManager.cs @@ -478,7 +478,7 @@ namespace System.Management.Automation.Remoting.Client _dataProcessingCallbacks.CommandCreationPacketReceived += new OutOfProcessUtils.CommandCreationPacketReceived(OnCommandCreationPacketReceived); _dataProcessingCallbacks.CommandCreationAckReceived += new OutOfProcessUtils.CommandCreationAckReceived(OnCommandCreationAckReceived); _dataProcessingCallbacks.SignalPacketReceived += new OutOfProcessUtils.SignalPacketReceived(OnSignalPacketReceived); - _dataProcessingCallbacks.SignalAckPacketReceived += new OutOfProcessUtils.SignalAckPacketReceived(OnSiganlAckPacketReceived); + _dataProcessingCallbacks.SignalAckPacketReceived += new OutOfProcessUtils.SignalAckPacketReceived(OnSignalAckPacketReceived); _dataProcessingCallbacks.ClosePacketReceived += new OutOfProcessUtils.ClosePacketReceived(OnClosePacketReceived); _dataProcessingCallbacks.CloseAckPacketReceived += new OutOfProcessUtils.CloseAckPacketReceived(OnCloseAckReceived); @@ -860,7 +860,7 @@ namespace System.Management.Automation.Remoting.Client OutOfProcessUtils.PS_OUT_OF_PROC_SIGNAL_TAG); } - private void OnSiganlAckPacketReceived(Guid psGuid) + private void OnSignalAckPacketReceived(Guid psGuid) { if (psGuid == Guid.Empty) { diff --git a/src/System.Management.Automation/engine/remoting/fanin/PriorityCollection.cs b/src/System.Management.Automation/engine/remoting/fanin/PriorityCollection.cs index e0cae0cc9..fc813f0e6 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/PriorityCollection.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/PriorityCollection.cs @@ -478,7 +478,7 @@ namespace System.Management.Automation.Remoting catch (System.OverflowException) { s_baseTracer.WriteLine("Fragement too big."); - ResetRecieveData(); + ResetReceiveData(); PSRemotingTransportException e = new PSRemotingTransportException(RemotingErrorIdStrings.ObjectIsTooBig); throw e; } @@ -513,7 +513,7 @@ namespace System.Management.Automation.Remoting _totalReceivedObjectSizeSoFar, _maxReceivedObjectSize); } - ResetRecieveData(); + ResetReceiveData(); throw e; } } @@ -572,7 +572,7 @@ namespace System.Management.Automation.Remoting { s_baseTracer.WriteLine("ObjectId != CurrentObjectId"); //TODO - drop an ETW event - ResetRecieveData(); + ResetReceiveData(); if (!_canIgnoreOffSyncFragments) { PSRemotingTransportException e = new PSRemotingTransportException(RemotingErrorIdStrings.ObjectIdsNotMatching); @@ -589,7 +589,7 @@ namespace System.Management.Automation.Remoting { s_baseTracer.WriteLine("Fragment Id is not in sequence."); //TODO - drop an ETW event - ResetRecieveData(); + ResetReceiveData(); if (!_canIgnoreOffSyncFragments) { PSRemotingTransportException e = new PSRemotingTransportException(RemotingErrorIdStrings.FragmetIdsNotInSequence); @@ -624,7 +624,7 @@ namespace System.Management.Automation.Remoting finally { // Reset the receive data buffers and start the process again. - ResetRecieveData(); + ResetReceiveData(); } if (_isDisposed) @@ -650,7 +650,7 @@ namespace System.Management.Automation.Remoting /// /// Resets the store(s) holding received data. /// - private void ResetRecieveData() + private void ResetReceiveData() { // reset resources used to store incoming data (for a single object) if (null != _dataToProcessStream) diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index fb4e9657c..cb6ebed42 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -134,7 +134,7 @@ namespace System.Management.Automation.Remoting.Client internal const int ERROR_WSMAN_COMPUTER_NOTFOUND = -2144108103; - internal const int ERROR_WSMAN_TARGET_UNKOWN = -2146893053; + internal const int ERROR_WSMAN_TARGET_UNKNOWN = -2146893053; internal const int ERROR_WSMAN_CANNOTUSE_IP = -2144108101; diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs index 596bb368e..e5463c25e 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs @@ -1487,7 +1487,7 @@ namespace System.Management.Automation.Remoting WSManPluginConstants.WSManPluginParamsGetRequestedLocale, outputStruct); //ref nativeLocaleData); - bool retreivingLocaleSucceeded = (0 == hResult); + bool retrievingLocaleSucceeded = (0 == hResult); WSManNativeApi.WSManData_UnToMan localeData = WSManNativeApi.WSManData_UnToMan.UnMarshal(outputStruct); // nativeLocaleData //IntPtr nativeDataLocaleData = IntPtr.Zero; @@ -1496,13 +1496,13 @@ namespace System.Management.Automation.Remoting WSManPluginConstants.WSManPluginParamsGetRequestedDataLocale, outputStruct); //ref nativeDataLocaleData); - bool retreivingDataLocaleSucceeded = ((int)WSManPluginErrorCodes.NoError == hResult); + bool retrievingDataLocaleSucceeded = ((int)WSManPluginErrorCodes.NoError == hResult); WSManNativeApi.WSManData_UnToMan dataLocaleData = WSManNativeApi.WSManData_UnToMan.UnMarshal(outputStruct); // nativeDataLocaleData // Set the UI Culture try { - if (retreivingLocaleSucceeded && ((uint)WSManNativeApi.WSManDataType.WSMAN_DATA_TYPE_TEXT == localeData.Type)) + if (retrievingLocaleSucceeded && ((uint)WSManNativeApi.WSManDataType.WSMAN_DATA_TYPE_TEXT == localeData.Type)) { CultureInfo uiCultureToUse = new CultureInfo(localeData.Text); ClrFacade.SetCurrentThreadUiCulture(uiCultureToUse); @@ -1516,7 +1516,7 @@ namespace System.Management.Automation.Remoting // Set the Culture try { - if (retreivingDataLocaleSucceeded && ((uint)WSManNativeApi.WSManDataType.WSMAN_DATA_TYPE_TEXT == dataLocaleData.Type)) + if (retrievingDataLocaleSucceeded && ((uint)WSManNativeApi.WSManDataType.WSMAN_DATA_TYPE_TEXT == dataLocaleData.Type)) { CultureInfo cultureToUse = new CultureInfo(dataLocaleData.Text); ClrFacade.SetCurrentThreadCulture(cultureToUse); diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs index 8e1a52ed1..fec6e1b7f 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginShellSession.cs @@ -55,11 +55,11 @@ namespace System.Management.Automation.Remoting protected WSManPluginServerSession( WSManNativeApi.WSManPluginRequest creationRequestDetails, - WSManPluginServerTransportManager trnsprtMgr) + WSManPluginServerTransportManager transportMgr) { _syncObject = new Object(); this.creationRequestDetails = creationRequestDetails; - this.transportMgr = trnsprtMgr; + this.transportMgr = transportMgr; transportMgr.PrepareCalled += new EventHandler(this.HandlePrepareFromTransportManager); @@ -416,10 +416,10 @@ namespace System.Management.Automation.Remoting #region Constructor internal WSManPluginShellSession( WSManNativeApi.WSManPluginRequest creationRequestDetails, - WSManPluginServerTransportManager trnsprtMgr, + WSManPluginServerTransportManager transportMgr, ServerRemoteSession remoteSession, WSManPluginOperationShutdownContext shutDownContext) - : base(creationRequestDetails, trnsprtMgr) + : base(creationRequestDetails, transportMgr) { _remoteSession = remoteSession; _remoteSession.Closed += @@ -744,9 +744,9 @@ namespace System.Management.Automation.Remoting internal WSManPluginCommandSession( WSManNativeApi.WSManPluginRequest creationRequestDetails, - WSManPluginServerTransportManager trnsprtMgr, + WSManPluginServerTransportManager transportMgr, ServerRemoteSession remoteSession) - : base(creationRequestDetails, trnsprtMgr) + : base(creationRequestDetails, transportMgr) { _remoteSession = remoteSession; cmdSyncObject = new System.Object(); diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs index c54e5adbb..68f9ce596 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs @@ -105,9 +105,9 @@ namespace System.Management.Automation.Remoting { RaiseClosingEvent(); - foreach (var cmdTrsprtKvp in _activeCmdTransportManagers) + foreach (var cmdTransportKvp in _activeCmdTransportManagers) { - cmdTrsprtKvp.Value.Close(reasonForClose); + cmdTransportKvp.Value.Close(reasonForClose); } _activeCmdTransportManagers.Clear(); diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs index c754f6a75..1bb69fa1a 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs @@ -80,7 +80,7 @@ namespace System.Management.Automation.Remoting.Client {WSManNativeApi.ERROR_WSMAN_BAD_METHOD, "WinRMOperationNotSupportedOnServer"}, {WSManNativeApi.ERROR_WSMAN_HTTP_SERVICE_UNAVAILABLE, "CannotConnectWinRMService"}, {WSManNativeApi.ERROR_WSMAN_HTTP_SERVICE_ERROR, "WinRMHttpError"}, - {WSManNativeApi.ERROR_WSMAN_TARGET_UNKOWN, "TargetUnknown"}, + {WSManNativeApi.ERROR_WSMAN_TARGET_UNKNOWN, "TargetUnknown"}, {WSManNativeApi.ERROR_WSMAN_CANNOTUSE_IP, "CannotUseIPAddress"} }; @@ -329,7 +329,7 @@ namespace System.Management.Automation.Remoting.Client [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] private IntPtr _wsManShellOperationHandle; [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] - private IntPtr _wsManRecieveOperationHandle; + private IntPtr _wsManReceiveOperationHandle; [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] private IntPtr _wsManSendOperationHandle; // this is used with WSMan callbacks to represent a session transport manager. @@ -1018,7 +1018,7 @@ namespace System.Management.Automation.Remoting.Client _receivedFromRemote = new WSManNativeApi.WSManShellAsync(new IntPtr(_sessionContextID), s_sessionReceiveCallback); WSManNativeApi.WSManReceiveShellOutputEx(_wsManShellOperationHandle, IntPtr.Zero, 0, WSManAPIData.OutputStreamSet, _receivedFromRemote, - ref _wsManRecieveOperationHandle); + ref _wsManReceiveOperationHandle); } } @@ -1675,10 +1675,10 @@ namespace System.Management.Automation.Remoting.Client // clearing for receive..Clear only when the end of operation is reached. if (flags == (int)WSManNativeApi.WSManCallbackFlags.WSMAN_FLAG_CALLBACK_END_OF_OPERATION) { - if (IntPtr.Zero != _wsManRecieveOperationHandle) + if (IntPtr.Zero != _wsManReceiveOperationHandle) { - WSManNativeApi.WSManCloseOperation(_wsManRecieveOperationHandle, 0); - _wsManRecieveOperationHandle = IntPtr.Zero; + WSManNativeApi.WSManCloseOperation(_wsManReceiveOperationHandle, 0); + _wsManReceiveOperationHandle = IntPtr.Zero; } if (null != _receivedFromRemote) @@ -2719,7 +2719,7 @@ namespace System.Management.Automation.Remoting.Client [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] private IntPtr _cmdSignalOperationHandle; [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] - private IntPtr _wsManRecieveOperationHandle; + private IntPtr _wsManReceiveOperationHandle; [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] private IntPtr _wsManSendOperationHandle; // this is used with WSMan callbacks to represent a command transport manager. @@ -2857,7 +2857,7 @@ namespace System.Management.Automation.Remoting.Client new PrioritySendDataCollection.OnDataAvailableCallback(OnDataAvailableCallback); _sessnTm = sessnTM; // Suspend queue on robust connections initiated event. - sessnTM.RobustConnectionsInitiated += HandleRobustConnectionsIntiated; + sessnTM.RobustConnectionsInitiated += HandleRobustConnectionsInitiated; // Resume queue on robust connections completed event. sessnTM.RobustConnectionsCompleted += HandleRobusConnectionsCompleted; @@ -2873,7 +2873,7 @@ namespace System.Management.Automation.Remoting.Client #region Internal Methods / Properties - private void HandleRobustConnectionsIntiated(object sender, EventArgs e) + private void HandleRobustConnectionsInitiated(object sender, EventArgs e) { SuspendQueue(); } @@ -3210,10 +3210,10 @@ namespace System.Management.Automation.Remoting.Client // clearing for receive..Clear only when the end of operation is reached. if (flags == (int)WSManNativeApi.WSManCallbackFlags.WSMAN_FLAG_CALLBACK_END_OF_OPERATION) { - if (IntPtr.Zero != _wsManRecieveOperationHandle) + if (IntPtr.Zero != _wsManReceiveOperationHandle) { - WSManNativeApi.WSManCloseOperation(_wsManRecieveOperationHandle, 0); - _wsManRecieveOperationHandle = IntPtr.Zero; + WSManNativeApi.WSManCloseOperation(_wsManReceiveOperationHandle, 0); + _wsManReceiveOperationHandle = IntPtr.Zero; } if (null != _receivedFromRemote) @@ -3930,7 +3930,7 @@ namespace System.Management.Automation.Remoting.Client WSManNativeApi.WSManReceiveShellOutputEx(_wsManShellOperationHandle, _wsManCmdOperationHandle, startInDisconnectedMode ? (int)WSManNativeApi.WSManShellFlag.WSMAN_FLAG_RECEIVE_DELAY_OUTPUT_STREAM : 0, _sessnTm.WSManAPIData.OutputStreamSet, - _receivedFromRemote, ref _wsManRecieveOperationHandle); + _receivedFromRemote, ref _wsManReceiveOperationHandle); } } @@ -3949,7 +3949,7 @@ namespace System.Management.Automation.Remoting.Client // unregister event handlers if (null != _sessnTm) { - _sessnTm.RobustConnectionsInitiated -= HandleRobustConnectionsIntiated; + _sessnTm.RobustConnectionsInitiated -= HandleRobustConnectionsInitiated; _sessnTm.RobustConnectionsCompleted -= HandleRobusConnectionsCompleted; } diff --git a/src/System.Management.Automation/engine/remoting/server/ServerRunspacePoolDriver.cs b/src/System.Management.Automation/engine/remoting/server/ServerRunspacePoolDriver.cs index d370442e8..419509e8b 100644 --- a/src/System.Management.Automation/engine/remoting/server/ServerRunspacePoolDriver.cs +++ b/src/System.Management.Automation/engine/remoting/server/ServerRunspacePoolDriver.cs @@ -260,7 +260,7 @@ namespace System.Management.Automation DataStructureHandler.SetMinRunspacesReceived += new EventHandler>(HandleSetMinRunspacesReceived); DataStructureHandler.GetAvailableRunspacesReceived += - new EventHandler>(HandleGetAvailalbeRunspacesReceived); + new EventHandler>(HandleGetAvailableRunspacesReceived); DataStructureHandler.ResetRunspaceState += new EventHandler>(HandleResetRunspaceState); } @@ -1143,7 +1143,7 @@ namespace System.Management.Automation /// /// sender of this event, unused /// contains information on the callid - private void HandleGetAvailalbeRunspacesReceived(object sender, RemoteDataEventArgs eventArgs) + private void HandleGetAvailableRunspacesReceived(object sender, RemoteDataEventArgs eventArgs) { PSObject data = eventArgs.Data; long callId = (long)((PSNoteProperty)data.Properties[RemoteDataNameStrings.CallId]).Value; diff --git a/src/System.Management.Automation/engine/remoting/server/ServerSteppablePipelineDriver.cs b/src/System.Management.Automation/engine/remoting/server/ServerSteppablePipelineDriver.cs index 1742b8520..b8f86f8db 100644 --- a/src/System.Management.Automation/engine/remoting/server/ServerSteppablePipelineDriver.cs +++ b/src/System.Management.Automation/engine/remoting/server/ServerSteppablePipelineDriver.cs @@ -434,7 +434,7 @@ namespace System.Management.Automation internal void SetState(PSInvocationState newState, Exception reason) { PSInvocationState copyState = PSInvocationState.NotStarted; - bool shoulRaiseEvents = false; + bool shouldRaiseEvents = false; lock (SyncObject) { switch (PipelineState) @@ -471,7 +471,7 @@ namespace System.Management.Automation case PSInvocationState.Stopped: case PSInvocationState.Failed: copyState = newState; - shoulRaiseEvents = true; + shouldRaiseEvents = true; break; } } @@ -484,11 +484,11 @@ namespace System.Management.Automation case PSInvocationState.Completed: case PSInvocationState.Failed: copyState = PSInvocationState.Stopped; - shoulRaiseEvents = true; + shouldRaiseEvents = true; break; case PSInvocationState.Stopped: copyState = newState; - shoulRaiseEvents = true; + shouldRaiseEvents = true; break; default: throw new InvalidOperationException(); @@ -505,7 +505,7 @@ namespace System.Management.Automation PipelineState = copyState; } - if (shoulRaiseEvents) + if (shouldRaiseEvents) { // send the state change notification to the client DataStructureHandler.SendStateChangedInformationToClient( diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs b/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs index db0e54e0c..25fc3d323 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs @@ -140,7 +140,7 @@ namespace System.Management.Automation.Remoting #endif Context = new ServerRemoteSessionContext(); - SessionDataStructureHandler = new ServerRemoteSessionDSHandlerlImpl(this, transportManager); + SessionDataStructureHandler = new ServerRemoteSessionDSHandlerImpl(this, transportManager); BaseSessionDataStructureHandler = SessionDataStructureHandler; SessionDataStructureHandler.CreateRunspacePoolReceived += HandleCreateRunspacePool; SessionDataStructureHandler.NegotiationReceived += HandleNegotiationReceived; diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs index 6041f023f..d4cfede25 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs @@ -1026,10 +1026,10 @@ namespace System.Management.Automation.Remoting /// /// The new state. /// - /// + /// /// Optional parameter that can provide additional information. This is currently not used. /// - private void SetState(RemoteSessionState newState, Exception reasion) + private void SetState(RemoteSessionState newState, Exception reason) { RemoteSessionState oldState = _state; if (newState != oldState) diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs b/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs index ecb5e1a6e..5af92f607 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs @@ -11,7 +11,7 @@ namespace System.Management.Automation.Remoting /// /// This class is an implementation of the abstract class ServerRemoteSessionDataStructureHandler. /// - internal class ServerRemoteSessionDSHandlerlImpl : ServerRemoteSessionDataStructureHandler + internal class ServerRemoteSessionDSHandlerImpl : ServerRemoteSessionDataStructureHandler { private AbstractServerSessionTransportManager _transportManager; private ServerRemoteSessionDSHandlerStateMachine _stateMachine; @@ -34,7 +34,7 @@ namespace System.Management.Automation.Remoting /// /// /// - internal ServerRemoteSessionDSHandlerlImpl(ServerRemoteSession session, + internal ServerRemoteSessionDSHandlerImpl(ServerRemoteSession session, AbstractServerSessionTransportManager transportManager) { Dbg.Assert(null != session, "session cannot be null."); From ca440b92e5b400e4f3ca62bdee1b9dbe5a426d96 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:45:40 +0000 Subject: [PATCH 20/29] spelling: locals in src/System.Management.Automation/engine/parser --- .../engine/parser/CharTraits.cs | 4 ++-- .../engine/parser/Parser.cs | 4 ++-- .../engine/parser/SemanticChecks.cs | 8 ++++---- .../engine/parser/TypeResolver.cs | 16 ++++++++-------- .../engine/parser/VariableAnalysis.cs | 2 +- .../engine/parser/ast.cs | 6 +++--- .../engine/parser/tokenizer.cs | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/System.Management.Automation/engine/parser/CharTraits.cs b/src/System.Management.Automation/engine/parser/CharTraits.cs index 6aed5f260..efb5f5d61 100644 --- a/src/System.Management.Automation/engine/parser/CharTraits.cs +++ b/src/System.Management.Automation/engine/parser/CharTraits.cs @@ -265,7 +265,7 @@ namespace System.Management.Automation.Language // Return true if the character can be the first character of // an identifier or label. - internal static bool IsIndentifierStart(this char c) + internal static bool IsIdentifierStart(this char c) { if (c < 128) { @@ -276,7 +276,7 @@ namespace System.Management.Automation.Language // Return true if the character can follow the first character of // an identifier or label. - internal static bool IsIndentifierFollow(this char c) + internal static bool IsIdentifierFollow(this char c) { if (c < 128) { diff --git a/src/System.Management.Automation/engine/parser/Parser.cs b/src/System.Management.Automation/engine/parser/Parser.cs index 7d6a70c7f..7ebedd8cc 100644 --- a/src/System.Management.Automation/engine/parser/Parser.cs +++ b/src/System.Management.Automation/engine/parser/Parser.cs @@ -3604,7 +3604,7 @@ namespace System.Management.Automation.Language ExpressionAst body = null; if (keywordData.BodyMode == DynamicKeywordBodyMode.ScriptBlock) { - var oldInConfiguraiton = _inConfiguration; + var oldInConfiguration = _inConfiguration; try { _inConfiguration = false; @@ -3612,7 +3612,7 @@ namespace System.Management.Automation.Language } finally { - _inConfiguration = oldInConfiguraiton; + _inConfiguration = oldInConfiguration; } } else if (keywordData.BodyMode == DynamicKeywordBodyMode.Hashtable) diff --git a/src/System.Management.Automation/engine/parser/SemanticChecks.cs b/src/System.Management.Automation/engine/parser/SemanticChecks.cs index 579498ee3..18b9765d1 100644 --- a/src/System.Management.Automation/engine/parser/SemanticChecks.cs +++ b/src/System.Management.Automation/engine/parser/SemanticChecks.cs @@ -334,19 +334,19 @@ namespace System.Management.Automation.Language public override AstVisitAction VisitTypeDefinition(TypeDefinitionAst typeDefinitionAst) { - AttributeAst dscResourceAttibuteAst = null; + AttributeAst dscResourceAttributeAst = null; for (int i = 0; i < typeDefinitionAst.Attributes.Count; i++) { var attr = typeDefinitionAst.Attributes[i]; if (attr.TypeName.GetReflectionAttributeType() == typeof(DscResourceAttribute)) { - dscResourceAttibuteAst = attr; + dscResourceAttributeAst = attr; break; } } - if (dscResourceAttibuteAst != null) + if (dscResourceAttributeAst != null) { - DscResourceChecker.CheckType(_parser, typeDefinitionAst, dscResourceAttibuteAst); + DscResourceChecker.CheckType(_parser, typeDefinitionAst, dscResourceAttributeAst); } return AstVisitAction.Continue; diff --git a/src/System.Management.Automation/engine/parser/TypeResolver.cs b/src/System.Management.Automation/engine/parser/TypeResolver.cs index 0251c5733..4a9b04460 100644 --- a/src/System.Management.Automation/engine/parser/TypeResolver.cs +++ b/src/System.Management.Automation/engine/parser/TypeResolver.cs @@ -67,7 +67,7 @@ namespace System.Management.Automation.Language } } - private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable assemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception) + private static Type LookForTypeInAssemblies(TypeName typeName, IEnumerable assemblies, TypeResolutionState typeResolutionState, bool reportAmbiguousException, out Exception exception) { exception = null; string alternateNameToFind = typeResolutionState.GetAlternateTypeName(typeName.Name); @@ -85,7 +85,7 @@ namespace System.Management.Automation.Language if (targetType != null) { - if (!reportAmbigousException) + if (!reportAmbiguousException) { // accelerator for the common case, when we are not interested in ambiguity exception. return targetType; @@ -159,7 +159,7 @@ namespace System.Management.Automation.Language return true; } - private static Type ResolveTypeNameWorker(TypeName typeName, SessionStateScope currentScope, IEnumerable loadedAssemblies, TypeResolutionState typeResolutionState, bool reportAmbigousException, out Exception exception) + private static Type ResolveTypeNameWorker(TypeName typeName, SessionStateScope currentScope, IEnumerable loadedAssemblies, TypeResolutionState typeResolutionState, bool reportAmbiguousException, out Exception exception) { Type result; exception = null; @@ -179,7 +179,7 @@ namespace System.Management.Automation.Language } exception = null; - result = LookForTypeInAssemblies(typeName, loadedAssemblies, typeResolutionState, reportAmbigousException, out exception); + result = LookForTypeInAssemblies(typeName, loadedAssemblies, typeResolutionState, reportAmbiguousException, out exception); if (exception != null) { // skip the rest of lookups, if exception reported. @@ -304,10 +304,10 @@ namespace System.Management.Automation.Language return typeName._typeDefinitionAst.Type; } - result = ResolveTypeNameWorker(typeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbigousException */ true, out exception); + result = ResolveTypeNameWorker(typeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbiguousException */ true, out exception); if (exception == null && result == null) { - result = ResolveTypeNameWorker(typeName, currentScope, assemList, typeResolutionState, /* reportAmbigousException */ false, out exception); + result = ResolveTypeNameWorker(typeName, currentScope, assemList, typeResolutionState, /* reportAmbiguousException */ false, out exception); } if (result != null) @@ -332,10 +332,10 @@ namespace System.Management.Automation.Language assemList = ClrFacade.GetAssemblies(typeResolutionState, newTypeName); } #endif - var newResult = ResolveTypeNameWorker(newTypeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbigousException */ true, out exception); + var newResult = ResolveTypeNameWorker(newTypeName, currentScope, typeResolutionState.assemblies, typeResolutionState, /* reportAmbiguousException */ true, out exception); if (exception == null && newResult == null) { - newResult = ResolveTypeNameWorker(newTypeName, currentScope, assemList, typeResolutionState, /* reportAmbigousException */ false, out exception); + newResult = ResolveTypeNameWorker(newTypeName, currentScope, assemList, typeResolutionState, /* reportAmbiguousException */ false, out exception); } if (exception != null) diff --git a/src/System.Management.Automation/engine/parser/VariableAnalysis.cs b/src/System.Management.Automation/engine/parser/VariableAnalysis.cs index eca4e98e6..419cc5632 100644 --- a/src/System.Management.Automation/engine/parser/VariableAnalysis.cs +++ b/src/System.Management.Automation/engine/parser/VariableAnalysis.cs @@ -11,7 +11,7 @@ using System.Reflection; namespace System.Management.Automation.Language { - internal static class VariablePathExtentions + internal static class VariablePathExtensions { internal static bool IsAnyLocal(this VariablePath variablePath) { diff --git a/src/System.Management.Automation/engine/parser/ast.cs b/src/System.Management.Automation/engine/parser/ast.cs index 2c394da30..d58c345e4 100644 --- a/src/System.Management.Automation/engine/parser/ast.cs +++ b/src/System.Management.Automation/engine/parser/ast.cs @@ -9886,7 +9886,7 @@ namespace System.Management.Automation.Language internal StringConstantExpressionAst(StringToken token) : base(token.Extent, token.Value) { - this.StringConstantType = MapTokenKindToStringContantKind(token); + this.StringConstantType = MapTokenKindToStringConstantKind(token); } /// @@ -9915,7 +9915,7 @@ namespace System.Management.Automation.Language get { return typeof(string); } } - internal static StringConstantType MapTokenKindToStringContantKind(Token token) + internal static StringConstantType MapTokenKindToStringConstantKind(Token token) { switch (token.Kind) { @@ -10019,7 +10019,7 @@ namespace System.Management.Automation.Language internal ExpandableStringExpressionAst(Token token, string value, string formatString, IEnumerable nestedExpressions) : this(token.Extent, value, formatString, StringConstantExpressionAst - .MapTokenKindToStringContantKind(token), + .MapTokenKindToStringConstantKind(token), nestedExpressions) { } diff --git a/src/System.Management.Automation/engine/parser/tokenizer.cs b/src/System.Management.Automation/engine/parser/tokenizer.cs index dfb833e42..f92a98696 100644 --- a/src/System.Management.Automation/engine/parser/tokenizer.cs +++ b/src/System.Management.Automation/engine/parser/tokenizer.cs @@ -3513,7 +3513,7 @@ namespace System.Management.Automation.Language { c = GetChar(); - if (c.IsIndentifierFollow()) + if (c.IsIdentifierFollow()) { sb.Append(c); } @@ -3677,7 +3677,7 @@ namespace System.Management.Automation.Language var sb = GetStringBuilder(); char c = GetChar(); - if (!c.IsIndentifierStart()) + if (!c.IsIdentifierStart()) { // Must be a generic token then sb.Append(':'); @@ -3690,7 +3690,7 @@ namespace System.Management.Automation.Language return ScanGenericToken(sb); } - while (c.IsIndentifierFollow()) + while (c.IsIdentifierFollow()) { sb.Append(c); c = GetChar(); @@ -4057,7 +4057,7 @@ namespace System.Management.Automation.Language case '!': c1 = PeekChar(); if ((InCommandMode() && !c1.ForceStartNewToken()) || - (InExpressionMode() && c1.IsIndentifierStart())) + (InExpressionMode() && c1.IsIdentifierStart())) { return ScanGenericToken(c); } From c724220af1937b60dc0c8f623b0a0a68f1de034e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:47:07 +0000 Subject: [PATCH 21/29] spelling: locals in src/System.Management.Automation/engine/Modules --- .../engine/Modules/AnalysisCache.cs | 8 ++--- .../engine/Modules/ModuleCmdletBase.cs | 34 +++++++++---------- .../Modules/NewModuleManifestCommand.cs | 8 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/System.Management.Automation/engine/Modules/AnalysisCache.cs b/src/System.Management.Automation/engine/Modules/AnalysisCache.cs index 70ebe628c..0b6220255 100644 --- a/src/System.Management.Automation/engine/Modules/AnalysisCache.cs +++ b/src/System.Management.Automation/engine/Modules/AnalysisCache.cs @@ -123,17 +123,17 @@ namespace System.Management.Automation var hadFunctions = AddPsd1EntryToResult(result, moduleManifestProperties["FunctionsToExport"], CommandTypes.Function, ref sawWildcard); var hadAliases = AddPsd1EntryToResult(result, moduleManifestProperties["AliasesToExport"], CommandTypes.Alias, ref sawWildcard); - var analysisSuceeded = hadCmdlets && hadFunctions && hadAliases; + var analysisSucceeded = hadCmdlets && hadFunctions && hadAliases; - if (!analysisSuceeded && !sawWildcard && (hadCmdlets || hadFunctions)) + if (!analysisSucceeded && !sawWildcard && (hadCmdlets || hadFunctions)) { // If we're missing CmdletsToExport, that might still be OK, but only if we have a script module. // Likewise, if we're missing FunctionsToExport, that might be OK, but only if we have a binary module. - analysisSuceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases); + analysisSucceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases); } - if (analysisSuceeded) + if (analysisSucceeded) { var moduleCacheEntry = new ModuleCacheEntry { diff --git a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs index 3e7368d3e..10c1fd274 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs @@ -762,12 +762,12 @@ namespace Microsoft.PowerShell.Commands Version version; if (Version.TryParse(subdirName, out version)) { - var modueBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase); + var moduleBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase); modulePath = new string[] { - Path.GetDirectoryName(modueBaseWithoutVersion), - modueBaseWithoutVersion + Path.GetDirectoryName(moduleBaseWithoutVersion), + moduleBaseWithoutVersion }; } else @@ -1874,24 +1874,24 @@ namespace Microsoft.PowerShell.Commands } // Test the required processor architecture - ProcessorArchitecture requiredProcesorArchitecture; + ProcessorArchitecture requiredProcessorArchitecture; if ( !GetScalarFromData(data, moduleManifestPath, "ProcessorArchitecture", manifestProcessingFlags, - out requiredProcesorArchitecture)) + out requiredProcessorArchitecture)) { containedErrors = true; if (bailOnFirstError) return null; } - else if ((requiredProcesorArchitecture != ProcessorArchitecture.None) && - (requiredProcesorArchitecture != ProcessorArchitecture.MSIL)) + else if ((requiredProcessorArchitecture != ProcessorArchitecture.None) && + (requiredProcessorArchitecture != ProcessorArchitecture.MSIL)) { bool isRunningOnArm = false; ProcessorArchitecture currentArchitecture = PsUtils.GetProcessorArchitecture(out isRunningOnArm); // For ARM Architectures, we need to do additional string-level comparison - if ((currentArchitecture != requiredProcesorArchitecture && !isRunningOnArm) || + if ((currentArchitecture != requiredProcessorArchitecture && !isRunningOnArm) || (isRunningOnArm && - !requiredProcesorArchitecture.ToString() + !requiredProcessorArchitecture.ToString() .Equals(PsUtils.ArmArchitecture, StringComparison.OrdinalIgnoreCase))) { containedErrors = true; @@ -1901,7 +1901,7 @@ namespace Microsoft.PowerShell.Commands ? PsUtils.ArmArchitecture : currentArchitecture.ToString(); message = StringUtil.Format(Modules.InvalidProcessorArchitecture, - actualCurrentArchitecture, moduleManifestPath, requiredProcesorArchitecture); + actualCurrentArchitecture, moduleManifestPath, requiredProcessorArchitecture); InvalidOperationException ioe = new InvalidOperationException(message); ErrorRecord er = new ErrorRecord(ioe, "Modules_InvalidProcessorArchitecture", ErrorCategory.ResourceUnavailable, moduleManifestPath); @@ -2527,7 +2527,7 @@ namespace Microsoft.PowerShell.Commands manifestInfo.PowerShellHostName = requestedHostName; manifestInfo.PowerShellHostVersion = requestedHostVersion; manifestInfo.PowerShellVersion = powerShellVersion; - manifestInfo.ProcessorArchitecture = requiredProcesorArchitecture; + manifestInfo.ProcessorArchitecture = requiredProcessorArchitecture; manifestInfo.Prefix = resolvedCommandPrefix; if (assemblyList != null) { @@ -2540,8 +2540,8 @@ namespace Microsoft.PowerShell.Commands { foreach (var f in fileList) { - string absuluteFilePath = GetAbsolutePath(moduleBase, f); - manifestInfo.AddToFileList(absuluteFilePath); + string absoluteFilePath = GetAbsolutePath(moduleBase, f); + manifestInfo.AddToFileList(absoluteFilePath); } } if (moduleList != null) @@ -2892,7 +2892,7 @@ namespace Microsoft.PowerShell.Commands null, //SessionState nestedModuleOptions, manifestProcessingFlags, - false, // addToParentModueIfFound + false, // addToParentModuleIfFound out found); } else @@ -3303,7 +3303,7 @@ namespace Microsoft.PowerShell.Commands if (newManifestInfo.ProcessorArchitecture == ProcessorArchitecture.None) { - newManifestInfo.ProcessorArchitecture = requiredProcesorArchitecture; + newManifestInfo.ProcessorArchitecture = requiredProcessorArchitecture; } if (newManifestInfo.RequiredAssemblies == null || newManifestInfo.RequiredAssemblies.LongCount() == 0) @@ -3627,7 +3627,7 @@ namespace Microsoft.PowerShell.Commands private readonly string _serviceCoreAssemblyFullName = "Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"; private readonly string _serviceCoreAssemblyShortName = "Microsoft.Powershell.Workflow.ServiceCore"; - private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModueIfFound, out bool found) + private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModuleIfFound, out bool found) { SessionStateInternal oldSessionState = Context.EngineSessionState; @@ -3663,7 +3663,7 @@ namespace Microsoft.PowerShell.Commands // If found, add it to the parent's list of NestedModules if (found) { - if (addToParentModueIfFound) + if (addToParentModuleIfFound) { parentModule.AddNestedModule(nestedModule); } diff --git a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs index 986289d25..8b7b34d6a 100644 --- a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs +++ b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs @@ -881,9 +881,9 @@ namespace Microsoft.PowerShell.Commands _exportedCmdlets = new string[] { "*" }; } - ValidateUriParamterValue(ProjectUri, "ProjectUri"); - ValidateUriParamterValue(LicenseUri, "LicenseUri"); - ValidateUriParamterValue(IconUri, "IconUri"); + ValidateUriParameterValue(ProjectUri, "ProjectUri"); + ValidateUriParameterValue(LicenseUri, "LicenseUri"); + ValidateUriParameterValue(IconUri, "IconUri"); if (CompatiblePSEditions != null && (CompatiblePSEditions.Distinct(StringComparer.OrdinalIgnoreCase).Count() != CompatiblePSEditions.Count())) { @@ -1131,7 +1131,7 @@ namespace Microsoft.PowerShell.Commands } } - private void ValidateUriParamterValue(Uri uri, string parameterName) + private void ValidateUriParameterValue(Uri uri, string parameterName) { Dbg.Assert(!String.IsNullOrWhiteSpace(parameterName), "parameterName should not be null or whitespace"); From 49fc2e96ef87c8e88ef5bd5040906b4b66bef609 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:48:16 +0000 Subject: [PATCH 22/29] spelling: locals in src/System.Management.Automation/engine/hostifaces --- .../engine/hostifaces/History.cs | 16 +++++++-------- .../engine/hostifaces/LocalConnection.cs | 20 +++++++++---------- .../engine/hostifaces/RunspacePoolInternal.cs | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/System.Management.Automation/engine/hostifaces/History.cs b/src/System.Management.Automation/engine/hostifaces/History.cs index 8d99e9ec4..3f517b097 100644 --- a/src/System.Management.Automation/engine/hostifaces/History.cs +++ b/src/System.Management.Automation/engine/hostifaces/History.cs @@ -1742,7 +1742,7 @@ namespace Microsoft.PowerShell.Commands } set { - _countParamterSpecified = true; + _countParameterSpecified = true; _count = value; } } @@ -1755,7 +1755,7 @@ namespace Microsoft.PowerShell.Commands /// /// a boolean variable to indicate if the count parameter specified /// - private bool _countParamterSpecified = false; + private bool _countParameterSpecified = false; /// /// Specifies whether new entries to be cleared or the default old ones. @@ -1824,7 +1824,7 @@ namespace Microsoft.PowerShell.Commands /// private void ClearHistoryByID() { - if (_countParamterSpecified && Count < 0) + if (_countParameterSpecified && Count < 0) { Exception ex = new ArgumentException @@ -1846,7 +1846,7 @@ namespace Microsoft.PowerShell.Commands if (_id != null) { // if count parameter is not present - if (!_countParamterSpecified) + if (!_countParameterSpecified) { // clearing the entry for each id in the id[] parameter. foreach (long id in _id) @@ -1908,7 +1908,7 @@ namespace Microsoft.PowerShell.Commands else { // confirmation message if all the clearhistory cmdlet is used without any parameters - if (_countParamterSpecified == false) + if (_countParameterSpecified == false) { string message = StringUtil.Format(HistoryStrings.ClearHistoryWarning, "Warning");// "The command would clear all the entry(s) from the session history,Are you sure you want to continue ?"; if (!ShouldProcess(message)) @@ -1933,7 +1933,7 @@ namespace Microsoft.PowerShell.Commands private void ClearHistoryByCmdLine() { // throw an exception for invalid count values - if (_countParamterSpecified && Count < 0) + if (_countParameterSpecified && Count < 0) { Exception ex = new ArgumentException @@ -1956,7 +1956,7 @@ namespace Microsoft.PowerShell.Commands if (_commandline != null) { // if count parameter is not present - if (!_countParamterSpecified) + if (!_countParameterSpecified) { foreach (string cmd in _commandline) { @@ -2038,7 +2038,7 @@ namespace Microsoft.PowerShell.Commands //creates a wild card pattern WildcardPattern wildcardpattern = WildcardPattern.Get(cmdline, WildcardOptions.IgnoreCase); //count set to zero if not specified. - if (!_countParamterSpecified && WildcardPattern.ContainsWildcardCharacters(cmdline)) + if (!_countParameterSpecified && WildcardPattern.ContainsWildcardCharacters(cmdline)) { count = 0; } diff --git a/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs b/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs index 32cc938de..e942eb462 100644 --- a/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs +++ b/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs @@ -459,16 +459,16 @@ namespace System.Management.Automation.Runspaces // appdomins for which the debug preference has to be enabled. if (processDebugPreference != null) { - List chachedAppDomainNames = null; + List cachedAppDomainNames = null; if (processDebugPreference.AppDomainNames != null && processDebugPreference.AppDomainNames.Length > 0) { - chachedAppDomainNames = new List(processDebugPreference.AppDomainNames); + cachedAppDomainNames = new List(processDebugPreference.AppDomainNames); foreach (string currentAppDomainName in appDomainName) { - if (!chachedAppDomainNames.Contains(currentAppDomainName, StringComparer.OrdinalIgnoreCase)) + if (!cachedAppDomainNames.Contains(currentAppDomainName, StringComparer.OrdinalIgnoreCase)) { - chachedAppDomainNames.Add(currentAppDomainName); + cachedAppDomainNames.Add(currentAppDomainName); iscacheUpdated = true; } } @@ -476,7 +476,7 @@ namespace System.Management.Automation.Runspaces if (iscacheUpdated) { - DebugPreference DebugPreference = CreateDebugPreference(chachedAppDomainNames.ToArray()); + DebugPreference DebugPreference = CreateDebugPreference(cachedAppDomainNames.ToArray()); debugPreferenceCache[processName] = DebugPreference; } } @@ -501,17 +501,17 @@ namespace System.Management.Automation.Runspaces // appdomins for which the debug preference has to be enabled. if (processDebugPreference != null) { - List chachedAppDomainNames = null; + List cachedAppDomainNames = null; if (processDebugPreference.AppDomainNames != null && processDebugPreference.AppDomainNames.Length > 0) { - chachedAppDomainNames = new List(processDebugPreference.AppDomainNames); + cachedAppDomainNames = new List(processDebugPreference.AppDomainNames); foreach (string currentAppDomainName in appDomainName) { - if (chachedAppDomainNames.Contains(currentAppDomainName, StringComparer.OrdinalIgnoreCase)) + if (cachedAppDomainNames.Contains(currentAppDomainName, StringComparer.OrdinalIgnoreCase)) { // remove requested appdomains debug preference details. - chachedAppDomainNames.Remove(currentAppDomainName); + cachedAppDomainNames.Remove(currentAppDomainName); iscacheUpdated = true; } } @@ -519,7 +519,7 @@ namespace System.Management.Automation.Runspaces if (iscacheUpdated) { - DebugPreference DebugPreference = CreateDebugPreference(chachedAppDomainNames.ToArray()); + DebugPreference DebugPreference = CreateDebugPreference(cachedAppDomainNames.ToArray()); debugPreferenceCache[processName] = DebugPreference; } } diff --git a/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs b/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs index f75104f2c..c332583fe 100644 --- a/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs +++ b/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs @@ -475,8 +475,8 @@ namespace System.Management.Automation.Runspaces.Internal // of the pool. while (pool.Count > maxRunspaces) { - Runspace rsToDestory = pool.Pop(); - DestroyRunspace(rsToDestory); + Runspace rsToDestroy = pool.Pop(); + DestroyRunspace(rsToDestroy); } } From 7ec70ee30d3fb4f137b98edc5d1de652c577b0fa Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:49:29 +0000 Subject: [PATCH 23/29] spelling: locals in src/System.Management.Automation/engine/CommandCompletion --- .../CommandCompletion/CommandCompletion.cs | 4 +-- .../CommandCompletion/CompletionAnalysis.cs | 12 ++++---- .../CommandCompletion/CompletionCompleters.cs | 20 ++++++------- .../CompletionExecutionHelper.cs | 2 +- .../PseudoParameterBinder.cs | 28 +++++++++---------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/System.Management.Automation/engine/CommandCompletion/CommandCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/CommandCompletion.cs index 06467ffcf..0abc2bf69 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CommandCompletion.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CommandCompletion.cs @@ -891,7 +891,7 @@ namespace System.Management.Automation // NTRAID#Windows Out Of Band Releases-927933-2006/03/13-JeffJon // Need to detect when the path is a provider-direct path and make sure - // to remove the provider-qualifer when the resolved path is returned. + // to remove the provider-qualifier when the resolved path is returned. bool isProviderDirectPath = lastWord.StartsWith(@"\\", StringComparison.Ordinal) || lastWord.StartsWith("//", StringComparison.Ordinal); @@ -1167,7 +1167,7 @@ namespace System.Management.Automation /// /// /// Receives the quote character that would be needed to end the sentence with a balanced pair of quotes. For - /// instance, if sentence is "foo then " is returned, if sentence if "foo" then nothing is resturned, if sentence is + /// instance, if sentence is "foo then " is returned, if sentence if "foo" then nothing is returned, if sentence is /// 'foo then ' is returned, if sentence is 'foo' then nothing is returned. /// /// The last word located, or the empty string if no word could be found. diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs index fa292025b..692bba496 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionAnalysis.cs @@ -417,7 +417,7 @@ namespace System.Management.Automation break; case TokenKind.Comma: - // Hanlde array elements such as dir .\cd, || dir -Path: .\cd, + // Handle array elements such as dir .\cd, || dir -Path: .\cd, if (lastAst is ErrorExpressionAst && (lastAst.Parent is CommandAst || lastAst.Parent is CommandParameterAst)) { @@ -561,7 +561,7 @@ namespace System.Management.Automation // // Handle following scenario, cursor is in next line and after a command call, // we need to skip the command call autocompletion if there is no backtick character - // in the end of the prevous line, since backtick means command call continues to the next line + // in the end of the previous line, since backtick means command call continues to the next line // // Configuration config // { @@ -596,7 +596,7 @@ namespace System.Management.Automation // new-object System.Drawing.Point -prop @{ X = 100; Y = <- Incomplete line // new-object new-object System.Drawing.Point -prop @{ X = <- Tab will yield hash properties. if (hashTableAst != null && - CheckForPendingAssigment(hashTableAst)) + CheckForPendingAssignment(hashTableAst)) { return result; } @@ -777,7 +777,7 @@ namespace System.Management.Automation return result; } - // Helper method to auto complete hashtale key + // Helper method to auto complete hashtable key private List GetResultForHashtable(CompletionContext completionContext) { var lastAst = completionContext.RelatedAsts.Last(); @@ -837,7 +837,7 @@ namespace System.Management.Automation } // Helper method to look for an incomplete assignment pair in hash table. - private bool CheckForPendingAssigment(HashtableAst hashTableAst) + private bool CheckForPendingAssignment(HashtableAst hashTableAst) { foreach (var keyValue in hashTableAst.KeyValuePairs) { @@ -1214,7 +1214,7 @@ namespace System.Management.Automation replacementIndex = completionContext.ReplacementIndex; replacementLength = completionContext.ReplacementLength; } - // Hanlde scenarios like this: "c:\wind". Treat the StringLiteral/StringExpandable as path/command + // Handle scenarios like this: "c:\wind". Treat the StringLiteral/StringExpandable as path/command else { // Handle path/commandname completion for quoted string diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs index 60e7c0b28..8746c14cd 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs @@ -1805,7 +1805,7 @@ namespace System.Management.Automation NativeCommandArgumentCompletion(commandName, parameter.Parameter, result, commandAst, context, boundArguments); } - private static IEnumerable NativeCommandArgumentCompletion_InferTypesOfArugment( + private static IEnumerable NativeCommandArgumentCompletion_InferTypesOfArgument( Dictionary boundArguments, CommandAst commandAst, CompletionContext context, @@ -2527,7 +2527,7 @@ namespace System.Management.Automation else if (boundArguments != null && boundArguments.ContainsKey("InputObject")) { gotInstance = true; - cimClassTypeNames = NativeCommandArgumentCompletion_InferTypesOfArugment(boundArguments, commandAst, context, "InputObject"); + cimClassTypeNames = NativeCommandArgumentCompletion_InferTypesOfArgument(boundArguments, commandAst, context, "InputObject"); } if (cimClassTypeNames != null) @@ -3893,7 +3893,7 @@ namespace System.Management.Automation } /// - /// Find the location where 'tab' is typed based on the line and colum. + /// Find the location where 'tab' is typed based on the line and column. /// private static ArgumentLocation FindTargetArgumentLocation(Collection parsedArguments, Token token) { @@ -4326,7 +4326,7 @@ namespace System.Management.Automation } catch (Exception e) { - // The object at the specifie path is not accessable, such as c:\hiberfil.sys (for hibernation) or c:\pagefile.sys (for paging) + // The object at the specified path is not accessable, such as c:\hiberfil.sys (for hibernation) or c:\pagefile.sys (for paging) // We ignore those files CommandProcessorBase.CheckForSevereException(e); continue; @@ -5857,8 +5857,8 @@ namespace System.Management.Automation #region Process_LoadedAssemblies - var assembliesExludingPSGenerated = ClrFacade.GetAssemblies(); - var allPublicTypes = assembliesExludingPSGenerated.SelectMany(assembly => assembly.GetTypes().Where(TypeResolver.IsPublic)); + var assembliesExcludingPSGenerated = ClrFacade.GetAssemblies(); + var allPublicTypes = assembliesExcludingPSGenerated.SelectMany(assembly => assembly.GetTypes().Where(TypeResolver.IsPublic)); foreach (var type in allPublicTypes) { @@ -6064,7 +6064,7 @@ namespace System.Management.Automation } } - //this is a temparary fix. Only the type defined in the same script get complete. Need to use using Module when that is available. + //this is a temporary fix. Only the type defined in the same script get complete. Need to use using Module when that is available. var scriptBlockAst = (ScriptBlockAst)context.RelatedAsts[0]; var typeAsts = scriptBlockAst.FindAll(ast => ast is TypeDefinitionAst, false).Cast(); foreach (var typeAst in typeAsts.Where(ast => pattern.IsMatch(ast.Name))) @@ -6251,7 +6251,7 @@ namespace System.Management.Automation { Diagnostics.Assert(ast.Keyword != null, "DynamicKeywordStatementAst.Keyword can never be null"); List results = null; - var dynamicKeywordProperies = ast.Keyword.Properties; + var dynamicKeywordProperties = ast.Keyword.Properties; var memberPattern = completionContext.WordToComplete + "*"; // @@ -6269,10 +6269,10 @@ namespace System.Management.Automation } } - if (dynamicKeywordProperies.Count > 0) + if (dynamicKeywordProperties.Count > 0) { // Excludes existing properties in the hashtable statement - var tempProperties = dynamicKeywordProperies.Where(p => !propertiesName.Contains(p.Key, StringComparer.OrdinalIgnoreCase)); + var tempProperties = dynamicKeywordProperties.Where(p => !propertiesName.Contains(p.Key, StringComparer.OrdinalIgnoreCase)); if (tempProperties != null && tempProperties.Any()) { results = new List(); diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs index f8a01b82e..6307a3956 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs @@ -12,7 +12,7 @@ namespace System.Management.Automation using System.Collections; /// - /// Auxilliary class to the execution of commands as needed by + /// Auxiliary class to the execution of commands as needed by /// CommandCompletion /// internal class CompletionExecutionHelper diff --git a/src/System.Management.Automation/engine/CommandCompletion/PseudoParameterBinder.cs b/src/System.Management.Automation/engine/CommandCompletion/PseudoParameterBinder.cs index ed73de847..d1ea4af2e 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/PseudoParameterBinder.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/PseudoParameterBinder.cs @@ -333,7 +333,7 @@ namespace System.Management.Automation.Language PseudoBindingInfo pseudoBinding = null; if (Runspace.DefaultRunspace == null) { - lock (s_bindCommandlLock) + lock (s_bindCommandLock) { if (s_bindCommandPowerShell == null) { @@ -360,7 +360,7 @@ namespace System.Management.Automation.Language return new StaticBindingResult(commandAst, pseudoBinding); } - private static Object s_bindCommandlLock = new Object(); + private static Object s_bindCommandLock = new Object(); private static PowerShell s_bindCommandPowerShell = null; } @@ -809,7 +809,7 @@ namespace System.Management.Automation.Language /// /// /// - /// + /// /// /// /// @@ -823,7 +823,7 @@ namespace System.Management.Automation.Language internal PseudoBindingInfo( CommandInfo commandInfo, uint validParameterSetsFlags, - uint defaultParameterSetFalg, + uint defaultParameterSetFlag, Dictionary boundParameters, List unboundParameters, Dictionary boundArguments, @@ -838,7 +838,7 @@ namespace System.Management.Automation.Language CommandInfo = commandInfo; InfoType = PseudoBindingInfoType.PseudoBindingSucceed; ValidParameterSetsFlags = validParameterSetsFlags; - DefaultParameterSetFlag = defaultParameterSetFalg; + DefaultParameterSetFlag = defaultParameterSetFlag; BoundParameters = boundParameters; UnboundParameters = unboundParameters; BoundArguments = boundArguments; @@ -1095,7 +1095,7 @@ namespace System.Management.Automation.Language } /// - /// Restores original ExceutionContext host state. + /// Restores original ExecutionContext host state. /// /// ExecutionContext private void RestoreHost(ExecutionContext executionContext) @@ -1118,7 +1118,7 @@ namespace System.Management.Automation.Language private CommandAst _commandAst; private ReadOnlyCollection _commandElements; - // binding realted states + // binding related states private bool _function = false; private string _commandName = null; private CommandInfo _commandInfo = null; @@ -1152,7 +1152,7 @@ namespace System.Management.Automation.Language _ignoredWorkflowParameters = new List(Cmdlet.CommonParameters.Concat(Cmdlet.OptionalCommonParameters)); _ignoredWorkflowParameters.RemoveAll(item => supportedCommonParameters.Contains(item, StringComparer.OrdinalIgnoreCase)); - // Initializing binding realted members + // Initializing binding related members _function = false; _commandName = null; _currentParameterSetFlag = uint.MaxValue; @@ -1285,7 +1285,7 @@ namespace System.Management.Automation.Language context.CurrentCommandProcessor = commandProcessor; commandProcessor.SetCurrentScopeToExecutionScope(); // Run method "BindCommandLineParametersNoValidation" to get all available parameters, including the dynamic - // parameters (some of them, not necessarilly all. Since we don't do the actual binding, some dynamic parameters + // parameters (some of them, not necessarily all. Since we don't do the actual binding, some dynamic parameters // might not be retrieved). if (!retryWithNoArgs) { @@ -1621,7 +1621,7 @@ namespace System.Management.Automation.Language catch (ParameterBindingException e) { // The parameterName is resolved to multiple parameters. The most possible scenario for this - // would be the user typping tab to complete a parameter. In this case, we can ignore this + // would be the user typing tab to complete a parameter. In this case, we can ignore this // parameter safely. // If the next item is a pure argument, we skip it so that it doesn't get bound @@ -1723,7 +1723,7 @@ namespace System.Management.Automation.Language catch (ParameterBindingException) { // The next parameter name is ambiguous. We just set - // a fake argument for the current paramter. + // a fake argument for the current parameter. FakePair newArg = new FakePair(argument.Parameter); result.Add(newArg); } @@ -1839,7 +1839,7 @@ namespace System.Management.Automation.Language catch (InvalidOperationException) { // This exception is thrown because the binder found two positional parameters - // from the same parameter set with the same position defined. The parameter denition + // from the same parameter set with the same position defined. The parameter definition // is ambiguous. We give up binding in this case _bindingEffective = false; return result; @@ -1867,7 +1867,7 @@ namespace System.Management.Automation.Language break; } - // The positional pseudo binding is processed in two different approches for parameter completion and parameter argument completion. + // The positional pseudo binding is processed in two different approaches for parameter completion and parameter argument completion. // - For parameter completion, we do NOT honor the default parameter set, so we can preserve potential parameters as many as possible. // Example: // Where-Object PropertyA - @@ -2011,7 +2011,7 @@ namespace System.Management.Automation.Language } } - // We preserve all posibilities + // We preserve all possibilities if (bindingSuccessful && localParameterSetFlag != 0) _currentParameterSetFlag &= localParameterSetFlag; return bindingSuccessful; From b79355b7f0946e21252140083b470ab834b4304f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:50:07 +0000 Subject: [PATCH 24/29] spelling: locals in src/System.Management.Automation/engine/ComInterop --- .../engine/ComInterop/ComEventSink.cs | 4 ++-- .../engine/ComInterop/ComEventSinkProxy.cs | 4 ++-- .../engine/ComInterop/ComInvokeBinder.cs | 4 ++-- .../engine/ComInterop/ComParamDesc.cs | 2 +- .../engine/ComInterop/ComTypeLibDesc.cs | 4 ++-- .../engine/ComInterop/IDispatchComObject.cs | 10 +++++----- .../engine/ComInterop/VarEnumSelector.cs | 2 +- .../engine/ComInterop/VariantArray.cs | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs b/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs index 5a873a581..cc9269f9a 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs @@ -18,11 +18,11 @@ namespace System.Management.Automation.ComInterop /// This class implements an event sink for a particular RCW. /// Unlike the implementation of events in TlbImp'd assemblies, /// we will create only one event sink per RCW (theoretically RCW might have - /// several ComEventSink evenk sinks - but all these implement different source intefaces). + /// several ComEventSink evenk sinks - but all these implement different source interfaces). /// Each ComEventSink contains a list of ComEventSinkMethod objects - which represent /// a single method on the source interface an a multicast delegate to redirect /// the calls. Notice that we are chaining multicast delegates so that same - /// ComEventSinkMedhod can invoke multiple event handlers). + /// ComEventSinkMethod can invoke multiple event handlers). /// /// ComEventSink implements an IDisposable pattern to Unadvise from the connection point. /// Typically, when RCW is finalized the corresponding Dispose will be triggered by diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs b/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs index d2c2abb53..1d7697ecf 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs @@ -29,11 +29,11 @@ namespace System.Management.Automation.ComInterop /// ComEventSink does not, strongly speaking, implements the interface /// that it claims to implement - it is just "faking" it by using IReflect. /// Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To - /// prevent this we take advangate of RealProxy's ability of + /// prevent this we take advantage of RealProxy's ability of /// "dressing up" like other classes and hence successfully respond to QIs /// for interfaces that it does not really support( it is OK to say /// "I implement this interface" for event sinks only since the common - /// practice is to use IDistpach.Invoke when calling into event sinks). + /// practice is to use IDispatch.Invoke when calling into event sinks). /// internal sealed class ComEventSinkProxy : RealProxy { diff --git a/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs b/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs index 95d8c078e..4559b9702 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs @@ -31,7 +31,7 @@ namespace System.Management.Automation.ComInterop private VarEnumSelector _varEnumSelector; private string[] _keywordArgNames; - private int _totalExplicitArgs; // Includes the individial elements of ArgumentKind.Dictionary (if any) + private int _totalExplicitArgs; // Includes the individual elements of ArgumentKind.Dictionary (if any) private ParameterExpression _dispatchObject; private ParameterExpression _dispatchPointer; @@ -249,7 +249,7 @@ namespace System.Management.Automation.ComInterop } else { - // Positial arguments are in reverse order at the tail of rgArgs + // Positional arguments are in reverse order at the tail of rgArgs variantIndex = reverseIndex; } VariantBuilder variantBuilder = _varEnumSelector.VariantBuilders[i]; diff --git a/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs index 07d096733..9f61c8539 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs @@ -26,7 +26,7 @@ namespace System.Management.Automation.ComInterop # region ctor /// - /// Creates a representation for the paramter of a COM method + /// Creates a representation for the parameter of a COM method /// internal ComParamDesc(ref ELEMDESC elemDesc, string name) { diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs index 52f7411d4..95edb22f7 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs @@ -59,7 +59,7 @@ namespace System.Management.Automation.ComInterop /// /// Reads the latest registered type library for the corresponding GUID, - /// reads definitions of CoClass'es and Enum's from this library + /// reads definitions of CoClasses and Enum's from this library /// and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses /// and get actual values for the enums. /// @@ -78,7 +78,7 @@ namespace System.Management.Automation.ComInterop /// /// Gets an ITypeLib object from OLE Automation compatible RCW , - /// reads definitions of CoClass'es and Enum's from this library + /// reads definitions of CoClasses and Enum's from this library /// and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses /// and get actual values for the enums. /// diff --git a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs index 200290818..47c35d0eb 100644 --- a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs +++ b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs @@ -129,9 +129,9 @@ namespace System.Management.Automation.ComInterop private static int GetIDsOfNames(IDispatch dispatch, string name, out int dispId) { int[] dispIds = new int[1]; - Guid emtpyRiid = Guid.Empty; + Guid emptyRiid = Guid.Empty; int hresult = dispatch.TryGetIDsOfNames( - ref emtpyRiid, + ref emptyRiid, new string[] { name }, 1, 0, @@ -143,13 +143,13 @@ namespace System.Management.Automation.ComInterop private static int Invoke(IDispatch dispatch, int memberDispId, out object result) { - Guid emtpyRiid = Guid.Empty; + Guid emptyRiid = Guid.Empty; ComTypes.DISPPARAMS dispParams = new ComTypes.DISPPARAMS(); ComTypes.EXCEPINFO excepInfo = new ComTypes.EXCEPINFO(); uint argErr; int hresult = dispatch.TryInvoke( memberDispId, - ref emtpyRiid, + ref emptyRiid, 0, ComTypes.INVOKEKIND.INVOKE_PROPERTYGET, ref dispParams, @@ -491,7 +491,7 @@ namespace System.Management.Automation.ComInterop // Sometimes coclass has multiple source interfaces. Usually this is caused by // adding new events and putting them on new interfaces while keeping the - // old interfaces around. This may cause name collisioning which we are + // old interfaces around. This may cause name collisions which we are // resolving by keeping only the first event with the same name. if (events.ContainsKey(name) == false) { diff --git a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs index 9bb7bed8d..14ea42e74 100644 --- a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs +++ b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs @@ -489,7 +489,7 @@ namespace System.Management.Automation.ComInterop } - // This helper is called when we are looking for a ByVal marhsalling + // This helper is called when we are looking for a ByVal marshalling // In a ByVal case we can take into account conversions or IConvertible if all other // attempts to find marshalling type failed private static ArgBuilder GetByValArgBuilder(Type elementType, ref VarEnum elementVarEnum) diff --git a/src/System.Management.Automation/engine/ComInterop/VariantArray.cs b/src/System.Management.Automation/engine/ComInterop/VariantArray.cs index 4bf2b6b87..742b9bb84 100644 --- a/src/System.Management.Automation/engine/ComInterop/VariantArray.cs +++ b/src/System.Management.Automation/engine/ComInterop/VariantArray.cs @@ -51,7 +51,7 @@ namespace System.Management.Automation.ComInterop internal static class VariantArray { // Don't need a dictionary for this, it will have very few elements - // (guarenteed less than 28, in practice 0-2) + // (guaranteed less than 28, in practice 0-2) private static readonly List s_generatedTypes = new List(0); internal static MemberExpression GetStructField(ParameterExpression variantArray, int field) From 3f992cd2637fb06dc46ecb5b55b73758d40435dd Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:54:41 +0000 Subject: [PATCH 25/29] spelling: locals in src/System.Management.Automation/engine --- .../engine/CmdletParameterBinderController.cs | 20 +++++++++---------- .../engine/CommandDiscovery.cs | 4 ++-- .../engine/InternalCommands.cs | 6 +++--- .../Serialization/InternalMISerializer.cs | 2 +- .../engine/PSVersionInfo.cs | 2 +- .../engine/ParameterBinderBase.cs | 8 ++++---- .../engine/TypeMetadata.cs | 6 +++--- .../engine/interpreter/Utilities.cs | 8 ++++---- .../singleshell/config/MshSnapinInfo.cs | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/System.Management.Automation/engine/CmdletParameterBinderController.cs b/src/System.Management.Automation/engine/CmdletParameterBinderController.cs index fefc32cc2..a2f5f3b40 100644 --- a/src/System.Management.Automation/engine/CmdletParameterBinderController.cs +++ b/src/System.Management.Automation/engine/CmdletParameterBinderController.cs @@ -2056,7 +2056,7 @@ namespace System.Management.Automation if (_currentParameterSetFlag == defaultParameterSet) Command.SetParameterSetName(CurrentParameterSetName); else - _parameterSetToBePrioritizedInPipelingBinding = defaultParameterSet; + _parameterSetToBePrioritizedInPipelineBinding = defaultParameterSet; } } // We need to analyze the prompting data that was gathered to determine what parameter @@ -2082,7 +2082,7 @@ namespace System.Management.Automation } } } - else if (_parameterSetToBePrioritizedInPipelingBinding == 0) + else if (_parameterSetToBePrioritizedInPipelineBinding == 0) { // We have more than one valid parameter set. Need to figure out which one to // use. @@ -2573,7 +2573,7 @@ namespace System.Management.Automation if (_currentParameterSetFlag != chosenMandatorySet) { - _parameterSetToBePrioritizedInPipelingBinding = chosenMandatorySet; + _parameterSetToBePrioritizedInPipelineBinding = chosenMandatorySet; } } } @@ -3459,15 +3459,15 @@ namespace System.Management.Automation _currentParameterSetFlag = _prePipelineProcessingParameterSetFlags; uint validParameterSets = _currentParameterSetFlag; - bool needToPrioritizeOneSpecificParameterSet = _parameterSetToBePrioritizedInPipelingBinding != 0; + bool needToPrioritizeOneSpecificParameterSet = _parameterSetToBePrioritizedInPipelineBinding != 0; int steps = needToPrioritizeOneSpecificParameterSet ? 2 : 1; if (needToPrioritizeOneSpecificParameterSet) { - // _parameterSetToBePrioritizedInPipelingBinding is set, so we are certain that the specified parameter set must be valid, + // _parameterSetToBePrioritizedInPipelineBinding is set, so we are certain that the specified parameter set must be valid, // and it's not the only valid parameter set. - Diagnostics.Assert((_currentParameterSetFlag & _parameterSetToBePrioritizedInPipelingBinding) != 0, "_parameterSetToBePrioritizedInPipelingBinding should be valid if it's set"); - validParameterSets = _parameterSetToBePrioritizedInPipelingBinding; + Diagnostics.Assert((_currentParameterSetFlag & _parameterSetToBePrioritizedInPipelineBinding) != 0, "_parameterSetToBePrioritizedInPipelineBinding should be valid if it's set"); + validParameterSets = _parameterSetToBePrioritizedInPipelineBinding; } for (int i = 0; i < steps; i++) @@ -3501,8 +3501,8 @@ namespace System.Management.Automation if (needToPrioritizeOneSpecificParameterSet && i == 0) { // If the prioritized set can be bound successfully, there is no need to do the second round binding - if (_currentParameterSetFlag == _parameterSetToBePrioritizedInPipelingBinding) break; - validParameterSets = _currentParameterSetFlag & (~_parameterSetToBePrioritizedInPipelingBinding); + if (_currentParameterSetFlag == _parameterSetToBePrioritizedInPipelineBinding) break; + validParameterSets = _currentParameterSetFlag & (~_parameterSetToBePrioritizedInPipelineBinding); } } @@ -4089,7 +4089,7 @@ namespace System.Management.Automation #endregion DefaultParameterBindingStructures - private uint _parameterSetToBePrioritizedInPipelingBinding = 0; + private uint _parameterSetToBePrioritizedInPipelineBinding = 0; /// /// The cmdlet metadata. diff --git a/src/System.Management.Automation/engine/CommandDiscovery.cs b/src/System.Management.Automation/engine/CommandDiscovery.cs index 743ecbe4a..e6932db53 100644 --- a/src/System.Management.Automation/engine/CommandDiscovery.cs +++ b/src/System.Management.Automation/engine/CommandDiscovery.cs @@ -558,7 +558,7 @@ namespace System.Management.Automation // #Requires -Module internal static void VerifyScriptRequirements(ExternalScriptInfo scriptInfo, ExecutionContext context) { - VerifyElevatedPriveleges(scriptInfo); + VerifyElevatedPrivileges(scriptInfo); VerifyPSVersion(scriptInfo); VerifyPSEdition(scriptInfo); VerifyRequiredModules(scriptInfo, context); @@ -616,7 +616,7 @@ namespace System.Management.Automation } } - internal static void VerifyElevatedPriveleges(ExternalScriptInfo scriptInfo) + internal static void VerifyElevatedPrivileges(ExternalScriptInfo scriptInfo) { bool requiresElevation = scriptInfo.RequiresElevation; bool isAdministrator = Utils.IsAdministrator(); diff --git a/src/System.Management.Automation/engine/InternalCommands.cs b/src/System.Management.Automation/engine/InternalCommands.cs index a523e62e9..65daebd1c 100644 --- a/src/System.Management.Automation/engine/InternalCommands.cs +++ b/src/System.Management.Automation/engine/InternalCommands.cs @@ -1644,13 +1644,13 @@ namespace Microsoft.PowerShell.Commands { if (!WildcardPattern.ContainsWildcardCharacters(_property)) { - PSMemberInfoInternalCollection restuls = new PSMemberInfoInternalCollection(); + PSMemberInfoInternalCollection results = new PSMemberInfoInternalCollection(); PSMemberInfo member = _inputObject.Members[_property]; if (member != null) { - restuls.Add(member); + results.Add(member); } - return new ReadOnlyPSMemberInfoCollection(restuls); + return new ReadOnlyPSMemberInfoCollection(results); } ReadOnlyPSMemberInfoCollection members = _inputObject.Members.Match(_property, PSMemberTypes.All); diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs b/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs index fee647292..8e8158997 100644 --- a/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs +++ b/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs @@ -42,7 +42,7 @@ namespace System.Management.Automation /// Used by Remoting infrastructure. This TypeTable instance /// will be used by Serializer if ExecutionContext is not - /// avaliable (to get the ExecutionContext's TypeTable) + /// available (to get the ExecutionContext's TypeTable) private TypeTable _typeTable; private Collection> _allPropertiesCollection; diff --git a/src/System.Management.Automation/engine/PSVersionInfo.cs b/src/System.Management.Automation/engine/PSVersionInfo.cs index 9e774c87d..936a1a6c3 100644 --- a/src/System.Management.Automation/engine/PSVersionInfo.cs +++ b/src/System.Management.Automation/engine/PSVersionInfo.cs @@ -228,7 +228,7 @@ namespace System.Management.Automation } - internal static string GetRegisteryVersionKeyForSnapinDiscovery(string majorVersion) + internal static string GetRegistryVersionKeyForSnapinDiscovery(string majorVersion) { int tempMajorVersion = 0; LanguagePrimitives.TryConvertTo(majorVersion, out tempMajorVersion); diff --git a/src/System.Management.Automation/engine/ParameterBinderBase.cs b/src/System.Management.Automation/engine/ParameterBinderBase.cs index b8d05c342..007601fcf 100644 --- a/src/System.Management.Automation/engine/ParameterBinderBase.cs +++ b/src/System.Management.Automation/engine/ParameterBinderBase.cs @@ -2052,14 +2052,14 @@ namespace System.Management.Automation if (_dictionary.ImplicitUsingParameters == null) { // Handle downlevel V4 case where using parameters are passed as an array list. - IList implictArrayUsingParameters = PSObject.Base(obj) as IList; - if ((implictArrayUsingParameters != null) && (implictArrayUsingParameters.Count > 0)) + IList implicitArrayUsingParameters = PSObject.Base(obj) as IList; + if ((implicitArrayUsingParameters != null) && (implicitArrayUsingParameters.Count > 0)) { // Convert array to hash table. _dictionary.ImplicitUsingParameters = new Hashtable(); - for (int index = 0; index < implictArrayUsingParameters.Count; index++) + for (int index = 0; index < implicitArrayUsingParameters.Count; index++) { - _dictionary.ImplicitUsingParameters.Add(index, implictArrayUsingParameters[index]); + _dictionary.ImplicitUsingParameters.Add(index, implicitArrayUsingParameters[index]); } } } diff --git a/src/System.Management.Automation/engine/TypeMetadata.cs b/src/System.Management.Automation/engine/TypeMetadata.cs index 1cf5fa9ee..ede36faae 100644 --- a/src/System.Management.Automation/engine/TypeMetadata.cs +++ b/src/System.Management.Automation/engine/TypeMetadata.cs @@ -704,10 +704,10 @@ namespace System.Management.Automation } // ConstrainedLanguage note - This conversion is analyzed, but actually invoked via regular conversion. - var convertionData = LanguagePrimitives.FigureConversion(dotNetType, this.ParameterType); - if (convertionData != null) + var conversionData = LanguagePrimitives.FigureConversion(dotNetType, this.ParameterType); + if (conversionData != null) { - if ((int)(convertionData.Rank) >= (int)(ConversionRank.NumericImplicitS2A)) + if ((int)(conversionData.Rank) >= (int)(ConversionRank.NumericImplicitS2A)) { return true; } diff --git a/src/System.Management.Automation/engine/interpreter/Utilities.cs b/src/System.Management.Automation/engine/interpreter/Utilities.cs index f655f083e..489855474 100644 --- a/src/System.Management.Automation/engine/interpreter/Utilities.cs +++ b/src/System.Management.Automation/engine/interpreter/Utilities.cs @@ -376,15 +376,15 @@ namespace System.Management.Automation.Interpreter { } - public HybridReferenceDictionary(int initialCapicity) + public HybridReferenceDictionary(int initialCapacity) { - if (initialCapicity > _arraySize) + if (initialCapacity > _arraySize) { - _dict = new Dictionary(initialCapicity); + _dict = new Dictionary(initialCapacity); } else { - _keysAndValues = new KeyValuePair[initialCapicity]; + _keysAndValues = new KeyValuePair[initialCapacity]; } } diff --git a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs index d79b4aa1c..cc9b1eabb 100644 --- a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs +++ b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs @@ -504,7 +504,7 @@ namespace System.Management.Automation Collection filteredVersions = new Collection(); foreach (string version in versions) { - string temp = PSVersionInfo.GetRegisteryVersionKeyForSnapinDiscovery(version); + string temp = PSVersionInfo.GetRegistryVersionKeyForSnapinDiscovery(version); if (string.IsNullOrEmpty(temp)) { temp = version; @@ -1173,7 +1173,7 @@ namespace System.Management.Automation Dbg.Assert(!string.IsNullOrEmpty(psVersion), "caller should validate the parameter"); Dbg.Assert(rootKey != null, "caller should validate the parameter"); - string versionKey = PSVersionInfo.GetRegisteryVersionKeyForSnapinDiscovery(psVersion); + string versionKey = PSVersionInfo.GetRegistryVersionKeyForSnapinDiscovery(psVersion); RegistryKey versionRoot = rootKey.OpenSubKey(versionKey); if (versionRoot == null) { From d517f1bafe7501a42e71c1f183a1a0e8f090fcb5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:55:14 +0000 Subject: [PATCH 26/29] spelling: locals in src/System.Management.Automation/DscSupport --- .../DscSupport/CimDSCParser.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/System.Management.Automation/DscSupport/CimDSCParser.cs b/src/System.Management.Automation/DscSupport/CimDSCParser.cs index 3acfc2316..d41ecbfe0 100644 --- a/src/System.Management.Automation/DscSupport/CimDSCParser.cs +++ b/src/System.Management.Automation/DscSupport/CimDSCParser.cs @@ -1275,7 +1275,7 @@ namespace Microsoft.PowerShell.DesiredStateConfiguration.Internal // And now define the driver functions in the current scope... if (functionsToDefine != null) { - functionsToDefine[moduleName + "\\" + keyword.Keyword] = CimKeywordImlementationFunction; + functionsToDefine[moduleName + "\\" + keyword.Keyword] = CimKeywordImplementationFunction; } } @@ -3583,17 +3583,17 @@ namespace Microsoft.PowerShell.DesiredStateConfiguration.Internal /// /// The scriptblock that implements the CIM keyword functionality. /// - private static ScriptBlock CimKeywordImlementationFunction + private static ScriptBlock CimKeywordImplementationFunction { get { // The scriptblock cache will handle mutual exclusion - return s_cimKeywordImlementationFunction ?? - (s_cimKeywordImlementationFunction = ScriptBlock.Create(CimKeywordImlementationFunctionText)); + return s_cimKeywordImplementationFunction ?? + (s_cimKeywordImplementationFunction = ScriptBlock.Create(CimKeywordImplementationFunctionText)); } } - private static ScriptBlock s_cimKeywordImlementationFunction; - private const string CimKeywordImlementationFunctionText = @" + private static ScriptBlock s_cimKeywordImplementationFunction; + private const string CimKeywordImplementationFunctionText = @" param ( [Parameter(Mandatory)] $KeywordData, From 498800160ec04874a61b46a7af943bdf3461f493 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 6 Sep 2016 05:18:02 +0000 Subject: [PATCH 27/29] spelling: locals in src/System.Management.Automation/CoreCLR --- .../CoreCLR/CorePsExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs b/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs index b1963f943..7e529ba45 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs @@ -420,10 +420,10 @@ namespace System.Management.Automation do { // Use 'for' loop to avoid construct new ArrayEnumerator object - for (int constorIndex = 0; constorIndex < constructors.Length; constorIndex++) + for (int constructorIndex = 0; constructorIndex < constructors.Length; constructorIndex++) { - var constor = constructors[constorIndex]; - ParameterInfo[] parameters = constor.GetParameters(); + var constructor = constructors[constructorIndex]; + ParameterInfo[] parameters = constructor.GetParameters(); if (types.Length == parameters.Length) { bool success = true; @@ -438,7 +438,7 @@ namespace System.Management.Automation if (success) { - matchConstructors.Add(constor); + matchConstructors.Add(constructor); } } } @@ -1110,7 +1110,7 @@ namespace System.Management.Automation break; case SpecialFolder.LocalApplicationData: folderPath = System.Environment.GetEnvironmentVariable("LOCALAPPDATA"); - // When powershell gets executed in SetupComplete.cmd during NanoSrever's first boot, 'LOCALAPPDATA' won't be set yet. + // When powershell gets executed in SetupComplete.cmd during NanoServer's first boot, 'LOCALAPPDATA' won't be set yet. // In this case, we need to return an alternate path, so that module auto-loading can continue to work properly. if (folderPath == null) { From c75e01a02f3a88ee596a934f26b4b08780bfd01f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 15:13:34 +0000 Subject: [PATCH 28/29] spelling: locals in src/System.Management.Automation/commands --- .../common/BaseFormattingCommandParameters.cs | 10 +++++----- .../FormatAndOutput/common/BaseOutputtingCommand.cs | 8 ++++---- .../common/DisplayDatabase/typeDataManager.cs | 12 ++++++------ .../common/DisplayDatabase/typeDataXmlLoader.cs | 6 +++--- .../DisplayDatabase/typeDataXmlLoader_Table.cs | 6 +++--- .../common/FormatViewGenerator_Table.cs | 2 +- .../utility/FormatAndOutput/common/TableWriter.cs | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs index 2c8b693c5..d6ee61a24 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs @@ -154,7 +154,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format hash.Add (FormatParameterDefinitionKeys.WidthEntryKey, width); if (align != null) - hash.Add (FormatParameterDefinitionKeys.AligmentEntryKey, align); + hash.Add (FormatParameterDefinitionKeys.AlignmentEntryKey, align); return hash; } @@ -244,9 +244,9 @@ namespace Microsoft.PowerShell.Commands.Internal.Format private bool _noGlobbing; } - internal class AligmentEntryDefinition : HashtableEntryDefinition + internal class AlignmentEntryDefinition : HashtableEntryDefinition { - internal AligmentEntryDefinition() : base(FormatParameterDefinitionKeys.AligmentEntryKey, + internal AlignmentEntryDefinition() : base(FormatParameterDefinitionKeys.AlignmentEntryKey, new Type[] { typeof(string) }) { } @@ -414,7 +414,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format internal const string FormatStringEntryKey = "formatString"; // specific to format-table - internal const string AligmentEntryKey = "alignment"; + internal const string AlignmentEntryKey = "alignment"; internal const string WidthEntryKey = "width"; // specific to format-table,list and wide @@ -453,7 +453,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format { base.SetEntries(); this.hashEntries.Add(new WidthEntryDefinition()); - this.hashEntries.Add(new AligmentEntryDefinition()); + this.hashEntries.Add(new AlignmentEntryDefinition()); this.hashEntries.Add(new LabelEntryDefinition()); } } diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs index 9a41a1cb7..24f612668 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs @@ -920,7 +920,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format columnWidthsHint = tableHint.columnWidths; } - int columsOnTheScreen = this.InnerCommand._lo.ColumnNumber; + int columnsOnTheScreen = this.InnerCommand._lo.ColumnNumber; int columns = this.CurrentTableHeaderInfo.tableColumnInfoList.Count; if (columns == 0) @@ -939,7 +939,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format alignment[k] = tci.alignment; k++; } - this.Writer.Initialize(0, columsOnTheScreen, columnWidths, alignment, this.CurrentTableHeaderInfo.hideHeader); + this.Writer.Initialize(0, columnsOnTheScreen, columnWidths, alignment, this.CurrentTableHeaderInfo.hideHeader); } /// @@ -1200,7 +1200,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format return; } - string[] values = new string[_buffer.Lenght]; + string[] values = new string[_buffer.Length]; for (int k = 0; k < values.Length; k++) { if (k < _buffer.CurrentCount) @@ -1231,7 +1231,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format /// /// get the size of the buffer /// - internal int Lenght { get { return _arr.Length; } } + internal int Length { get { return _arr.Length; } } /// /// get the current number of entries in the buffer diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs index f1bfda22e..209074058 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs @@ -349,8 +349,8 @@ namespace Microsoft.PowerShell.Commands.Internal.Format if (Database == null) { TypeInfoDataBase tempDataBase = new TypeInfoDataBase(); - AddPreLoadInstrinsics(tempDataBase); - AddPostLoadInstrinsics(tempDataBase); + AddPreLoadIntrinsics(tempDataBase); + AddPostLoadIntrinsics(tempDataBase); Database = tempDataBase; } } @@ -393,7 +393,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format TypeInfoDataBase db = new TypeInfoDataBase(); // prepopulate the database with any necessary overriding data - AddPreLoadInstrinsics(db); + AddPreLoadIntrinsics(db); var etwEnabled = RunspaceEventSource.Log.IsEnabled(); @@ -439,7 +439,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format } // add any sensible defaults to the database - AddPostLoadInstrinsics(db); + AddPostLoadIntrinsics(db); return db; } @@ -534,7 +534,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format /// helper to to add any pre-load intrinsics to the db /// /// db being initialized - private static void AddPreLoadInstrinsics(TypeInfoDataBase db) + private static void AddPreLoadIntrinsics(TypeInfoDataBase db) { // NOTE: nothing to add for the time being. Add here if needed. } @@ -543,7 +543,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format /// helper to to add any post-load intrinsics to the db /// /// db being initialized - private static void AddPostLoadInstrinsics(TypeInfoDataBase db) + private static void AddPostLoadIntrinsics(TypeInfoDataBase db) { // add entry for the output of update-formatdata // we want to be able to display this as a list, unless overridden diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs index 6c81c3c73..28ad70473 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs @@ -158,9 +158,9 @@ namespace Microsoft.PowerShell.Commands.Internal.Format internal const string True = "TRUE"; internal const string False = "FALSE"; - internal const string AligmentLeft = "left"; - internal const string AligmentCenter = "center"; - internal const string AligmentRight = "right"; + internal const string AlignmentLeft = "left"; + internal const string AlignmentCenter = "center"; + internal const string AlignmentRight = "right"; } // Flag that determines whether validation should be suppressed while diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs index 7d5a9e2e6..a9871f368 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs @@ -270,15 +270,15 @@ namespace Microsoft.PowerShell.Commands.Internal.Format return false; // fatal error } - if (string.Equals(n.InnerText, XMLStringValues.AligmentLeft, StringComparison.OrdinalIgnoreCase)) + if (string.Equals(n.InnerText, XMLStringValues.AlignmentLeft, StringComparison.OrdinalIgnoreCase)) { alignmentValue = TextAlignment.Left; } - else if (string.Equals(n.InnerText, XMLStringValues.AligmentRight, StringComparison.OrdinalIgnoreCase)) + else if (string.Equals(n.InnerText, XMLStringValues.AlignmentRight, StringComparison.OrdinalIgnoreCase)) { alignmentValue = TextAlignment.Right; } - else if (string.Equals(n.InnerText, XMLStringValues.AligmentCenter, StringComparison.OrdinalIgnoreCase)) + else if (string.Equals(n.InnerText, XMLStringValues.AlignmentCenter, StringComparison.OrdinalIgnoreCase)) { alignmentValue = TextAlignment.Center; } diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs index 8bbdaf52f..df0822fc5 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs @@ -255,7 +255,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format // set the alignment if (a.OriginatingParameter != null) { - object key = a.OriginatingParameter.GetEntry(FormatParameterDefinitionKeys.AligmentEntryKey); + object key = a.OriginatingParameter.GetEntry(FormatParameterDefinitionKeys.AlignmentEntryKey); if (key != AutomationNull.Value) ci.alignment = (int)key; diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs index 48c09ba2d..22a1e5840 100644 --- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs +++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs @@ -308,7 +308,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format return rows; } - private StringCollection GenerateMultiLineRowField(string val, int k, int aligment, DisplayCells dc) + private StringCollection GenerateMultiLineRowField(string val, int k, int alignment, DisplayCells dc) { StringCollection sc = StringManipulationHelper.GenerateLines(dc, val, _si.columnInfo[k].width, _si.columnInfo[k].width); @@ -316,7 +316,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format for (int col = 0; col < sc.Count; col++) { if (dc.Length(sc[col]) < _si.columnInfo[k].width) - sc[col] = GenerateRowField(sc[col], _si.columnInfo[k].width, aligment, dc); + sc[col] = GenerateRowField(sc[col], _si.columnInfo[k].width, alignment, dc); } return sc; } From fbec6eca5a31a5bc4002d2290ff5304a7c2ecec1 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 16:03:02 +0000 Subject: [PATCH 29/29] spelling: locals in src/System.Management.Automation/namespaces --- .../namespaces/FileSystemProvider.cs | 22 +++++++++---------- .../namespaces/TransactedRegistryKey.cs | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs index d8f140845..eb1e8b9d6 100644 --- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs +++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs @@ -1233,7 +1233,7 @@ namespace Microsoft.PowerShell.Commands if (fspDynamicParam != null) { evaluator = fspDynamicParam.Attributes; - switchEvaluator = FormatAttributeSwitchParamters(); + switchEvaluator = FormatAttributeSwitchParameters(); } bool filterHidden = false; // "Hidden" is specified somewhere in the expression @@ -1525,7 +1525,7 @@ namespace Microsoft.PowerShell.Commands if (fspDynamicParam != null) { evaluator = fspDynamicParam.Attributes; - switchEvaluator = FormatAttributeSwitchParamters(); + switchEvaluator = FormatAttributeSwitchParameters(); } bool attributeFilter = true; @@ -1632,7 +1632,7 @@ namespace Microsoft.PowerShell.Commands if (fspDynamicParam != null) { evaluator = fspDynamicParam.Attributes; - switchEvaluator = FormatAttributeSwitchParamters(); + switchEvaluator = FormatAttributeSwitchParameters(); } // Write out the items @@ -1766,7 +1766,7 @@ namespace Microsoft.PowerShell.Commands /// Otherwise, /// returns NULL /// - private FlagsExpression FormatAttributeSwitchParamters() + private FlagsExpression FormatAttributeSwitchParameters() { FlagsExpression switchParamEvaluator = null; StringBuilder sb = new StringBuilder(); @@ -3219,15 +3219,15 @@ namespace Microsoft.PowerShell.Commands // If the items see if we need to check the age of the file... if (result && itemExistsDynamicParameters != null) { - DateTime lastWrtiteTime = File.GetLastWriteTime(path); + DateTime lastWriteTime = File.GetLastWriteTime(path); if (itemExistsDynamicParameters.OlderThan.HasValue) { - result = lastWrtiteTime < itemExistsDynamicParameters.OlderThan.Value; + result = lastWriteTime < itemExistsDynamicParameters.OlderThan.Value; } if (itemExistsDynamicParameters.NewerThan.HasValue) { - result = lastWrtiteTime > itemExistsDynamicParameters.NewerThan.Value; + result = lastWriteTime > itemExistsDynamicParameters.NewerThan.Value; } } } @@ -3492,7 +3492,7 @@ namespace Microsoft.PowerShell.Commands { ps.Runspace = fromSession.Runspace; - InitilizeFunctionPSCopyFileFromRemoteSession(ps); + InitializeFunctionPSCopyFileFromRemoteSession(ps); try { @@ -3571,7 +3571,7 @@ namespace Microsoft.PowerShell.Commands { bool isContainer = IsItemContainer(path); - InitilizeFunctionsPSCopyFileToRemoteSession(ps); + InitializeFunctionsPSCopyFileToRemoteSession(ps); try { @@ -3998,7 +3998,7 @@ namespace Microsoft.PowerShell.Commands return streams; } - private void InitilizeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell ps) + private void InitializeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell ps) { if ((ps == null) || !ValidRemoteSessionForScripting(ps.Runspace)) { return; } @@ -4299,7 +4299,7 @@ namespace Microsoft.PowerShell.Commands return success; } - private void InitilizeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell ps) + private void InitializeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell ps) { if ((ps == null) || !ValidRemoteSessionForScripting(ps.Runspace)) { return; } diff --git a/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs b/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs index eaefe4f5e..e67f6d557 100644 --- a/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs +++ b/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs @@ -768,7 +768,7 @@ namespace Microsoft.PowerShell.Commands.Internal if (ret == 0 && !result.IsInvalid) { TransactedRegistryKey key = new TransactedRegistryKey(result, writable, false, Transaction.Current, safeTransactionHandle); - key._checkMode = GetSubKeyPermissonCheck(writable); + key._checkMode = GetSubKeyPermissionCheck(writable); key._keyName = _keyName + "\\" + name; return key; } @@ -1986,7 +1986,7 @@ namespace Microsoft.PowerShell.Commands.Internal // Suppressed to be consistent with naming in Microsoft.Win32.RegistryKey [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")] - private RegistryKeyPermissionCheck GetSubKeyPermissonCheck(bool subkeyWritable) + private RegistryKeyPermissionCheck GetSubKeyPermissionCheck(bool subkeyWritable) { if (_checkMode == RegistryKeyPermissionCheck.Default) {