diff --git a/src/System.Management.Automation/engine/remoting/client/Job2.cs b/src/System.Management.Automation/engine/remoting/client/Job2.cs index 14113c99fc..8300434d06 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 a445fd3ec8..0c43bd36e5 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 c30f9499cd..7012291cf3 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 880bdf776b..36f4628a6c 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 7c9ed5f972..2c39d972d0 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 5f0b22c64e..a3590fcef1 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 3ed0615c86..a24789b5f3 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 90f78e1e24..e03727ed3a 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 b3d474b04f..a6d1eff814 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 afe99acb80..f65e2fc3fb 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 79cfad1bd7..2ce90e0af9 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 2f79834f23..807927f500 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 b016a4cd68..087196baf0 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 2862f33835..b1dd8ca64d 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 03a7e9a4c0..5999eb4d5c 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 dfbc1138d4..795c69044b 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 e0cae0cc98..fc813f0e67 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 fb4e9657cb..cb6ebed42f 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 596bb368eb..e5463c25e3 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 8e1a52ed1e..fec6e1b7fe 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 c54e5adbbf..68f9ce596f 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 c754f6a759..1bb69fa1ac 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 d370442e85..419509e8bd 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 1742b85204..b8f86f8dba 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 db0e54e0c8..25fc3d3233 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 6041f023f0..d4cfede254 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 ecb5e1a6ed..5af92f607e 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.");