Skip to content

Commit 624c626

Browse files
Add XML doc comments to runspace cmdlets
Add XML documentation to various runspace cmdlet classes to improve IntelliSense and generated docs. Provides <summary> comments for the Name property in GetDbaRunspace, ScriptBlock and Name in RegisterDbaRunspace, and Name/Runspace parameters in StartDbaRunspace and StopDbaRunspace. Also adds <inheritdoc /> to the ProcessRecord overrides.
1 parent 8b4173c commit 624c626

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

project/dbatools/Commands/RunspaceCmdlets.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ namespace Dataplat.Dbatools.Commands
1414
[OutputType(typeof(RunspaceContainer))]
1515
public class GetDbaRunspaceCommand : DbaBaseCmdlet
1616
{
17+
/// <summary>
18+
/// Wildcard name filter for runspaces to retrieve.
19+
/// </summary>
1720
[Parameter(Position = 0)]
1821
public string Name { get; set; } = "*";
1922

23+
/// <inheritdoc />
2024
protected override void ProcessRecord()
2125
{
2226
foreach (RunspaceContainer container in RunspaceHost.Runspaces.Values)
@@ -33,12 +37,19 @@ protected override void ProcessRecord()
3337
[Cmdlet("Register", "DbaRunspace")]
3438
public class RegisterDbaRunspaceCommand : DbaBaseCmdlet
3539
{
40+
/// <summary>
41+
/// The scriptblock to execute in the managed runspace.
42+
/// </summary>
3643
[Parameter(Mandatory = true)]
3744
public ScriptBlock ScriptBlock { get; set; }
3845

46+
/// <summary>
47+
/// Name to register the runspace under.
48+
/// </summary>
3949
[Parameter(Mandatory = true)]
4050
public string Name { get; set; }
4151

52+
/// <inheritdoc />
4253
protected override void ProcessRecord()
4354
{
4455
string normalizedName = Name.ToLowerInvariant();
@@ -62,12 +73,19 @@ protected override void ProcessRecord()
6273
[Cmdlet("Start", "DbaRunspace")]
6374
public class StartDbaRunspaceCommand : DbaBaseCmdlet
6475
{
76+
/// <summary>
77+
/// Names of the runspaces to start.
78+
/// </summary>
6579
[Parameter(ValueFromPipeline = true)]
6680
public string[] Name { get; set; }
6781

82+
/// <summary>
83+
/// Runspace containers to start.
84+
/// </summary>
6885
[Parameter(ValueFromPipeline = true)]
6986
public RunspaceContainer[] Runspace { get; set; }
7087

88+
/// <inheritdoc />
7189
protected override void ProcessRecord()
7290
{
7391
List<RunspaceContainer> toStart = new List<RunspaceContainer>();
@@ -119,12 +137,19 @@ protected override void ProcessRecord()
119137
[Cmdlet("Stop", "DbaRunspace")]
120138
public class StopDbaRunspaceCommand : DbaBaseCmdlet
121139
{
140+
/// <summary>
141+
/// Names of the runspaces to stop.
142+
/// </summary>
122143
[Parameter(ValueFromPipeline = true)]
123144
public string[] Name { get; set; }
124145

146+
/// <summary>
147+
/// Runspace containers to stop.
148+
/// </summary>
125149
[Parameter(ValueFromPipeline = true)]
126150
public RunspaceContainer[] Runspace { get; set; }
127151

152+
/// <inheritdoc />
128153
protected override void ProcessRecord()
129154
{
130155
List<RunspaceContainer> toStop = new List<RunspaceContainer>();

0 commit comments

Comments
 (0)