diff options
author | Dongbo Wang <dongbow@microsoft.com> | 2022-11-03 21:44:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 21:44:46 +0300 |
commit | db21524d2385b33483276fd8ac2f0e04bd80a61e (patch) | |
tree | e8fa6952154b0c8acee61506dd4abf1985e4749f | |
parent | 455d29471c062f5d1230da589ec3d37de9a4dee0 (diff) |
Add missing XML doc elements for methods in `RunspaceFactory` (#18450)
-rw-r--r-- | src/System.Management.Automation/engine/hostifaces/ConnectionFactory.cs | 68 | ||||
-rw-r--r-- | src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs | 18 |
2 files changed, 58 insertions, 28 deletions
diff --git a/src/System.Management.Automation/engine/hostifaces/ConnectionFactory.cs b/src/System.Management.Automation/engine/hostifaces/ConnectionFactory.cs index 014eed0f54..45591ee290 100644 --- a/src/System.Management.Automation/engine/hostifaces/ConnectionFactory.cs +++ b/src/System.Management.Automation/engine/hostifaces/ConnectionFactory.cs @@ -476,58 +476,64 @@ namespace System.Management.Automation.Runspaces #region Runspace - Remote Factory /// <summary> + /// Creates a remote Runspace. /// </summary> + /// <param name="connectionInfo">It defines connection path to a remote runspace that needs to be created.</param> + /// <param name="host">The explicit PSHost implementation.</param> /// <param name="typeTable"> /// The TypeTable to use while deserializing/serializing remote objects. /// TypeTable has the following information used by serializer: /// 1. SerializationMethod /// 2. SerializationDepth /// 3. SpecificSerializationProperties + /// /// TypeTable has the following information used by deserializer: /// 1. TargetTypeForDeserialization /// 2. TypeConverter /// </param> - /// <param name="host"></param> - /// <param name="connectionInfo"></param> - /// <returns></returns> + /// <returns>A remote Runspace.</returns> public static Runspace CreateRunspace(RunspaceConnectionInfo connectionInfo, PSHost host, TypeTable typeTable) { return CreateRunspace(connectionInfo, host, typeTable, null, null); } /// <summary> + /// Creates a remote Runspace. /// </summary> + /// <param name="connectionInfo">It defines connection path to a remote runspace that needs to be created.</param> + /// <param name="host">The explicit PSHost implementation.</param> /// <param name="typeTable"> /// The TypeTable to use while deserializing/serializing remote objects. /// TypeTable has the following information used by serializer: /// 1. SerializationMethod /// 2. SerializationDepth /// 3. SpecificSerializationProperties + /// /// TypeTable has the following information used by deserializer: /// 1. TargetTypeForDeserialization /// 2. TypeConverter /// </param> - /// <param name="host"></param> - /// <param name="connectionInfo"></param> /// <param name="applicationArguments"> /// Application arguments the server can see in <see cref="System.Management.Automation.Remoting.PSSenderInfo.ApplicationArguments"/> /// </param> - /// <returns></returns> + /// <returns>A remote Runspace.</returns> public static Runspace CreateRunspace(RunspaceConnectionInfo connectionInfo, PSHost host, TypeTable typeTable, PSPrimitiveDictionary applicationArguments) { return CreateRunspace(connectionInfo, host, typeTable, applicationArguments, null); } /// <summary> + /// Creates a remote Runspace. /// </summary> - /// <param name="connectionInfo"></param> - /// <param name="host"></param> + /// <param name="connectionInfo">It defines connection path to a remote runspace that needs to be created.</param> + /// <param name="host">The explicit PSHost implementation.</param> /// <param name="typeTable"> /// The TypeTable to use while deserializing/serializing remote objects. /// TypeTable has the following information used by serializer: /// 1. SerializationMethod /// 2. SerializationDepth /// 3. SpecificSerializationProperties + /// /// TypeTable has the following information used by deserializer: /// 1. TargetTypeForDeserialization /// 2. TypeConverter @@ -536,7 +542,7 @@ namespace System.Management.Automation.Runspaces /// Application arguments the server can see in <see cref="System.Management.Automation.Remoting.PSSenderInfo.ApplicationArguments"/> /// </param> /// <param name="name">Name for remote runspace.</param> - /// <returns></returns> + /// <returns>A remote Runspace.</returns> public static Runspace CreateRunspace(RunspaceConnectionInfo connectionInfo, PSHost host, TypeTable typeTable, PSPrimitiveDictionary applicationArguments, string name) { if (connectionInfo is WSManConnectionInfo) @@ -548,19 +554,21 @@ namespace System.Management.Automation.Runspaces } /// <summary> + /// Creates a remote Runspace. /// </summary> - /// <param name="host"></param> - /// <param name="connectionInfo"></param> - /// <returns></returns> + /// <param name="host">The explicit PSHost implementation.</param> + /// <param name="connectionInfo">It defines connection path to a remote runspace that needs to be created.</param> + /// <returns>A remote Runspace.</returns> public static Runspace CreateRunspace(PSHost host, RunspaceConnectionInfo connectionInfo) { return CreateRunspace(connectionInfo, host, null); } /// <summary> + /// Creates a remote Runspace. /// </summary> - /// <param name="connectionInfo"></param> - /// <returns></returns> + /// <param name="connectionInfo">It defines connection path to a remote runspace that needs to be created.</param> + /// <returns>A remote Runspace.</returns> public static Runspace CreateRunspace(RunspaceConnectionInfo connectionInfo) { return CreateRunspace(null, connectionInfo); @@ -571,9 +579,20 @@ namespace System.Management.Automation.Runspaces #region V3 Extensions /// <summary> + /// Creates an out-of-process remote Runspace. /// </summary> - /// <param name="typeTable"></param> - /// <returns></returns> + /// <param name="typeTable"> + /// The TypeTable to use while deserializing/serializing remote objects. + /// TypeTable has the following information used by serializer: + /// 1. SerializationMethod + /// 2. SerializationDepth + /// 3. SpecificSerializationProperties + /// + /// TypeTable has the following information used by deserializer: + /// 1. TargetTypeForDeserialization + /// 2. TypeConverter + /// </param> + /// <returns>An out-of-process remote Runspace.</returns> public static Runspace CreateOutOfProcessRunspace(TypeTable typeTable) { NewProcessConnectionInfo connectionInfo = new NewProcessConnectionInfo(null); @@ -582,10 +601,21 @@ namespace System.Management.Automation.Runspaces } /// <summary> + /// Creates an out-of-process remote Runspace. /// </summary> - /// <param name="typeTable"></param> - /// <param name="processInstance"></param> - /// <returns></returns> + /// <param name="typeTable"> + /// The TypeTable to use while deserializing/serializing remote objects. + /// TypeTable has the following information used by serializer: + /// 1. SerializationMethod + /// 2. SerializationDepth + /// 3. SpecificSerializationProperties + /// + /// TypeTable has the following information used by deserializer: + /// 1. TargetTypeForDeserialization + /// 2. TypeConverter + /// </param> + /// <param name="processInstance">It represents a PowerShell process that is used for an out-of-process remote Runspace</param> + /// <returns>An out-of-process remote Runspace.</returns> public static Runspace CreateOutOfProcessRunspace(TypeTable typeTable, PowerShellProcessInstance processInstance) { NewProcessConnectionInfo connectionInfo = new NewProcessConnectionInfo(null) { Process = processInstance }; diff --git a/src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs b/src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs index 3f4dcf4074..076aee75ae 100644 --- a/src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs +++ b/src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs @@ -11,6 +11,7 @@ using System.Text; namespace System.Management.Automation.Runspaces { /// <summary> + /// This class represents a PowerShell process that is used for an out-of-process remote Runspace. /// </summary> public sealed class PowerShellProcessInstance : IDisposable { @@ -30,8 +31,6 @@ namespace System.Management.Automation.Runspaces #region Constructors - /// <summary> - /// </summary> static PowerShellProcessInstance() { #if UNIX @@ -145,10 +144,10 @@ namespace System.Management.Automation.Runspaces /// <summary> /// Initializes a new instance of the <see cref="PowerShellProcessInstance"/> class. Initializes the underlying dotnet process class. /// </summary> - /// <param name="powerShellVersion"></param> - /// <param name="credential"></param> - /// <param name="initializationScript"></param> - /// <param name="useWow64"></param> + /// <param name="powerShellVersion">Specifies the version of powershell.</param> + /// <param name="credential">Specifies a user account credentials.</param> + /// <param name="initializationScript">Specifies a script that will be executed when the powershell process is initialized.</param> + /// <param name="useWow64">Specifies if the powershell process will be 32-bit.</param> public PowerShellProcessInstance(Version powerShellVersion, PSCredential credential, ScriptBlock initializationScript, bool useWow64) : this(powerShellVersion, credential, initializationScript, useWow64, workingDirectory: null) { } @@ -178,7 +177,9 @@ namespace System.Management.Automation.Runspaces #endregion Constructors #region Dispose + /// <summary> + /// Implementing the <see cref="IDisposable"/> interface. /// </summary> public void Dispose() { @@ -186,9 +187,6 @@ namespace System.Management.Automation.Runspaces GC.SuppressFinalize(this); } - /// <summary> - /// </summary> - /// <param name="disposing"></param> private void Dispose(bool disposing) { if (_isDisposed) return; @@ -220,7 +218,9 @@ namespace System.Management.Automation.Runspaces #endregion Dispose #region Public Properties + /// <summary> + /// Gets the process object of the remote target. /// </summary> public Process Process { get; } |