mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
spelling: comments in src/System.Management.Automation/engine/remoting/server
This commit is contained in:
1 parent
ef44569f9d
commit
bf5d15d891
8 files changed
+26
-26
No files matched your search
@@ -342,7 +342,7 @@ namespace System.Management.Automation.Remoting.Server
|
||||
lock (_syncObject)
|
||||
{
|
||||
// give a chance to runspace/pipelines to close (as it looks like the client died
|
||||
// interminently)
|
||||
// intermittently)
|
||||
sessionTM.Close(null);
|
||||
sessionTM = null;
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ namespace System.Management.Automation
|
||||
/// <remarks>This method should be called before
|
||||
/// sending the state information. The client will
|
||||
/// remove the association between a powershell and
|
||||
/// runspace pool if it recieves any of the terminal
|
||||
/// runspace pool if it receives any of the terminal
|
||||
/// states. Hence all the remaining data should be
|
||||
/// sent before this happens. Else the data will be
|
||||
/// discarded</remarks>
|
||||
|
||||
@@ -398,7 +398,7 @@ namespace System.Management.Automation.Remoting
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Server Debuger
|
||||
/// Server Debugger
|
||||
/// </summary>
|
||||
internal Debugger ServerDebugger
|
||||
{
|
||||
|
||||
@@ -503,7 +503,7 @@ namespace System.Management.Automation
|
||||
// no need to listen for closing events as we are initiating the close
|
||||
_transportManager.Closing -= HandleTransportClosing;
|
||||
// if terminal state is reached close the transport manager instead of letting
|
||||
// the client intiate the close.
|
||||
// the client initiate the close.
|
||||
_transportManager.Close(null);
|
||||
}
|
||||
}
|
||||
@@ -589,7 +589,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// called when session is connected from a new client
|
||||
/// calls into observers of this event.
|
||||
/// observers include corrensponding driver that shutsdown
|
||||
/// observers include corresponding driver that shutdown
|
||||
/// input stream is present
|
||||
/// </summary>
|
||||
internal void ProcessConnect()
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send applicaiton private data to client
|
||||
/// Send application private data to client
|
||||
/// will be called during runspace creation
|
||||
/// and each time a new client connects to the server session
|
||||
/// </summary>
|
||||
@@ -2366,7 +2366,7 @@ namespace System.Management.Automation
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blocks DebugerStop event thread until exit debug mode is
|
||||
/// Blocks DebuggerStop event thread until exit debug mode is
|
||||
/// received from the client.
|
||||
/// </summary>
|
||||
private void OnEnterDebugMode(ManualResetEventSlim debugModeCompletedEvent)
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace System.Management.Automation.Remoting
|
||||
internal RemoteSessionCapability ServerCapability { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if negotiation from client is succeeded...in which case ClienCapability
|
||||
/// True if negotiation from client is succeeded...in which case ClientCapability
|
||||
/// is the capability that server agreed with.
|
||||
/// </summary>
|
||||
internal bool IsNegotiationSucceeded { get; set; }
|
||||
@@ -102,7 +102,7 @@ namespace System.Management.Automation.Remoting
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// This constructor inistantiates a ServerRemoteSession object and
|
||||
/// This constructor instantiates a ServerRemoteSession object and
|
||||
/// a ServerRemoteSessionDataStructureHandler object.
|
||||
/// </summary>
|
||||
/// <param name="senderInfo">
|
||||
@@ -150,11 +150,11 @@ namespace System.Management.Automation.Remoting
|
||||
transportManager.Closing += HandleResourceClosing;
|
||||
|
||||
// update the quotas from sessionState..start with default size..and
|
||||
// when Custom Session Configuration is loaded (during runsapce creation) update this.
|
||||
// when Custom Session Configuration is loaded (during runspace creation) update this.
|
||||
transportManager.ReceivedDataCollection.MaximumReceivedObjectSize =
|
||||
BaseTransportManager.MaximumReceivedObjectSize;
|
||||
|
||||
// session transport manager can recieve unlimited data..however each object is limited
|
||||
// session transport manager can receive unlimited data..however each object is limited
|
||||
// by maxRecvdObjectSize. this is to allow clients to use a session for an unlimited time..
|
||||
// also the messages that can be sent to a session are limited and very controlled.
|
||||
// However a command transport manager can be restricted to receive only a fixed amount of data
|
||||
@@ -168,7 +168,7 @@ namespace System.Management.Automation.Remoting
|
||||
#region Creation Factory
|
||||
|
||||
/// <summary>
|
||||
/// Creates a server remote session for the supplied <paramref name="configuratioinProviderId"/>
|
||||
/// Creates a server remote session for the supplied <paramref name="configurationProviderId"/>
|
||||
/// and <paramref name="transportManager"/>.
|
||||
/// </summary>
|
||||
/// <param name="senderInfo"></param>
|
||||
@@ -464,13 +464,13 @@ namespace System.Management.Automation.Remoting
|
||||
|
||||
/// <summary>
|
||||
/// This property returns the ServerRemoteSessionContext object created inside
|
||||
/// this object's contructor.
|
||||
/// this object's constructor.
|
||||
/// </summary>
|
||||
internal ServerRemoteSessionContext Context { get; }
|
||||
|
||||
/// <summary>
|
||||
/// This property returns the ServerRemoteSessionDataStructureHandler object created inside
|
||||
/// this object's contructor.
|
||||
/// this object's constructor.
|
||||
/// </summary>
|
||||
internal ServerRemoteSessionDataStructureHandler SessionDataStructureHandler { get; }
|
||||
|
||||
@@ -493,15 +493,15 @@ namespace System.Management.Automation.Remoting
|
||||
/// ExecutesConnect. expects client capability and connect_runspacepool PSRP
|
||||
/// messages in connectData.
|
||||
/// If negotiation is successful and max and min runspaces in connect_runspacepool
|
||||
/// match the assiciated runspace pool parameters, it builds up server capability
|
||||
/// match the associated runspace pool parameters, it builds up server capability
|
||||
/// and runspace_initinfo in connectResponseData.
|
||||
/// This is a version of Connect that executes the whole connect alogirithm in one single
|
||||
/// This is a version of Connect that executes the whole connect algorithm in one single
|
||||
/// hop.
|
||||
/// This algorithm is being executed synchronously without associating with state machine.
|
||||
/// </summary>
|
||||
/// <param name="connectData"></param>
|
||||
/// <param name="connectResponseData"></param>
|
||||
/// The operation is being outside the statemachine becuase of multiple reasons assiciated with design simplicity
|
||||
/// The operation is being outside the statemachine because of multiple reasons associated with design simplicity
|
||||
/// - Support automatic disconnect and let wsman server stack take care of connection state
|
||||
/// - The response data should not travel in transports output stream but as part of connect response
|
||||
/// - We want this operation to be synchronous
|
||||
@@ -520,7 +520,7 @@ namespace System.Management.Automation.Remoting
|
||||
}
|
||||
|
||||
//TODO: Follow up on comment from Krishna regarding having the serialization/deserialization separate for this
|
||||
// operation. This could be integrated as helper functions in fragmenter/serializer components
|
||||
// operation. This could be integrated as helper functions in fragmentor/serializer components
|
||||
long fragmentId = FragmentedRemoteObject.GetFragmentId(connectData, 0);
|
||||
bool sFlag = FragmentedRemoteObject.GetIsStartFragment(connectData, 0);
|
||||
bool eFlag = FragmentedRemoteObject.GetIsEndFragment(connectData, 0);
|
||||
@@ -664,7 +664,7 @@ namespace System.Management.Automation.Remoting
|
||||
|
||||
//we currently dont support adjusting runspace count on a connect operation.
|
||||
//there is a potential race here where in the runspace pool driver is still yet to process a queued
|
||||
//setMax or setMinrunspacees request.
|
||||
//setMax or setMinrunspaces request.
|
||||
//TODO: resolve this race.. probably by letting the runspace pool consume all messages before we execute this.
|
||||
if (clientRequestedRunspaceCount
|
||||
&& (_runspacePoolDriver.RunspacePool.GetMaxRunspaces() != clientRequestedMaxRunspaces)
|
||||
@@ -674,7 +674,7 @@ namespace System.Management.Automation.Remoting
|
||||
}
|
||||
|
||||
// all client messages are validated
|
||||
// now build up the server capabilites and connect response messages to be piggybacked on connect response
|
||||
// now build up the server capabilities and connect response messages to be piggybacked on connect response
|
||||
RemoteDataObject capability = RemotingEncoder.GenerateServerSessionCapability(Context.ServerCapability, _runspacePoolDriver.InstanceId);
|
||||
RemoteDataObject runspacepoolInitData = RemotingEncoder.GenerateRunspacePoolInitData(_runspacePoolDriver.InstanceId,
|
||||
_runspacePoolDriver.RunspacePool.GetMaxRunspaces(),
|
||||
@@ -682,7 +682,7 @@ namespace System.Management.Automation.Remoting
|
||||
|
||||
//having this stream operating separately will result in out of sync fragment Ids. but this is still OK
|
||||
//as this is executed only when connecting from a new client that does not have any previous fragments context.
|
||||
//no problem even if fragment Ids in this respose and the sessiontransport stream clash (interfere) and its guaranteed
|
||||
//no problem even if fragment Ids in this response and the sessiontransport stream clash (interfere) and its guaranteed
|
||||
// that the fragments in connect response are always complete (enclose a complete object).
|
||||
SerializedDataStream stream = new SerializedDataStream(4 * 1024);//Each message with fragment headers cannot cross 4k
|
||||
stream.Enter();
|
||||
@@ -697,8 +697,8 @@ namespace System.Management.Automation.Remoting
|
||||
//we are done
|
||||
connectResponseData = outbuffer;
|
||||
|
||||
//enque a connect event in state machine to let session do any other post-connect operation
|
||||
// Do this outside of the sychronous connect operation, as otherwise connect can easily get deadlocked
|
||||
//enqueue a connect event in state machine to let session do any other post-connect operation
|
||||
// Do this outside of the synchronous connect operation, as otherwise connect can easily get deadlocked
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(
|
||||
delegate (object state)
|
||||
{
|
||||
@@ -947,7 +947,7 @@ namespace System.Management.Automation.Remoting
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle session closing event to close runspace pool drivers this sesion is hosting.
|
||||
/// Handle session closing event to close runspace pool drivers this session is hosting.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="eventArgs"></param>
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ namespace System.Management.Automation.Remoting
|
||||
#region Event Handlers
|
||||
|
||||
/// <summary>
|
||||
/// This is the handler for Start event of the FSM. This is the begining of everything
|
||||
/// This is the handler for Start event of the FSM. This is the beginning of everything
|
||||
/// else. From this moment on, the FSM will proceeds step by step to eventually reach
|
||||
/// Established state or Closed state.
|
||||
/// </summary>
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ namespace System.Management.Automation.Remoting
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method sends the server side capability negotitation packet to the client.
|
||||
/// This method sends the server side capability negotiation packet to the client.
|
||||
/// </summary>
|
||||
internal override void SendNegotiationAsync()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user