Skip to content

Commit 0f04de1

Browse files
committed
Fix some documentation warnings
Mostly low-hanging fruit and Linux additions/changes.
1 parent 790a072 commit 0f04de1

10 files changed

Lines changed: 104 additions & 78 deletions

File tree

src/Microsoft.PowerShell.Commands.Diagnostics/GetEventCommand.cs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ namespace Microsoft.PowerShell.Commands
2727
[Cmdlet(VerbsCommon.Get, "WinEvent" , DefaultParameterSetName = "GetLogSet", HelpUri = "http://go.microsoft.com/fwlink/?LinkID=138336")]
2828
public sealed class GetWinEventCommand : PSCmdlet
2929
{
30-
//
31-
// ListLog parameter
32-
//
30+
/// <summary>
31+
/// ListLog parameter
32+
/// </summary>
3333
[Parameter(
3434
Position = 0,
3535
Mandatory = true,
@@ -51,9 +51,9 @@ public string[] ListLog
5151
}
5252
private string[] _listLog = {"*"};
5353

54-
//
55-
// GetLog parameter
56-
//
54+
/// <summary>
55+
/// GetLog parameter
56+
/// </summary>
5757
[Parameter(
5858
Position = 0,
5959
ParameterSetName="GetLogSet",
@@ -73,9 +73,9 @@ public string[] LogName
7373
private string[] _logName = {"*"};
7474

7575

76-
//
77-
// ListProvider parameter
78-
//
76+
/// <summary>
77+
/// ListProvider parameter
78+
/// </summary>
7979
[Parameter(
8080
Position = 0,
8181
Mandatory = true,
@@ -99,9 +99,9 @@ public string[] ListProvider
9999
private string[] _listProvider = {"*"};
100100

101101

102-
//
103-
// ProviderName parameter
104-
//
102+
/// <summary>
103+
/// ProviderName parameter
104+
/// </summary>
105105
[Parameter(
106106
Position = 0,
107107
Mandatory = true,
@@ -123,9 +123,9 @@ public string[] ProviderName
123123
private string[] _providerName;
124124

125125

126-
//
127-
// Path parameter
128-
//
126+
/// <summary>
127+
/// Path parameter
128+
/// </summary>
129129
[Parameter(
130130
Position = 0,
131131
Mandatory = true,
@@ -147,9 +147,9 @@ public string[] Path
147147
private string[] _path;
148148

149149

150-
//
151-
// MaxEvents parameter
152-
//
150+
/// <summary>
151+
/// MaxEvents parameter
152+
/// </summary>
153153
[Parameter(
154154
ParameterSetName="FileSet",
155155
ValueFromPipeline = false,
@@ -188,9 +188,9 @@ public Int64 MaxEvents
188188
}
189189
private Int64 _maxEvents = -1;
190190

191-
//
192-
// ComputerName parameter
193-
//
191+
/// <summary>
192+
/// ComputerName parameter
193+
/// </summary>
194194
[Parameter(
195195
ParameterSetName="ListProviderSet",
196196
HelpMessageBaseName = "GetEventResources",
@@ -225,9 +225,9 @@ public string ComputerName
225225
}
226226
private string _computerName = string.Empty;
227227

228-
//
229-
// Credential parameter
230-
//
228+
/// <summary>
229+
/// Credential parameter
230+
/// </summary>
231231
[Parameter(ParameterSetName="ListProviderSet")]
232232
[Parameter(ParameterSetName="GetProviderSet")]
233233
[Parameter(ParameterSetName="ListLogSet")]
@@ -244,9 +244,9 @@ public PSCredential Credential
244244
private PSCredential _credential = PSCredential.Empty;
245245

246246

247-
//
248-
// FilterXPath parameter
249-
//
247+
/// <summary>
248+
/// FilterXPath parameter
249+
/// </summary>
250250
[Parameter(
251251
ParameterSetName="FileSet",
252252
ValueFromPipeline = false,
@@ -270,9 +270,9 @@ public string FilterXPath
270270
}
271271
private string _filter = "*";
272272

273-
//
274-
// FilterXml parameter
275-
//
273+
/// <summary>
274+
/// FilterXml parameter
275+
/// </summary>
276276
[Parameter(
277277
Position = 0,
278278
Mandatory = true,
@@ -294,9 +294,9 @@ public XmlDocument FilterXml
294294
private XmlDocument _xmlQuery = null;
295295

296296

297-
//
298-
// FilterHashtable parameter
299-
//
297+
/// <summary>
298+
/// FilterHashtable parameter
299+
/// </summary>
300300
[Parameter(
301301
Position = 0,
302302
Mandatory = true,
@@ -317,9 +317,9 @@ public Hashtable[] FilterHashtable
317317
}
318318
private Hashtable[] _selector;
319319

320-
//
321-
// Force switch
322-
//
320+
/// <summary>
321+
/// Force switch
322+
/// </summary>
323323
[Parameter(ParameterSetName="ListLogSet")]
324324
[Parameter(ParameterSetName="GetProviderSet")]
325325
[Parameter(ParameterSetName="GetLogSet")]
@@ -332,9 +332,9 @@ public SwitchParameter Force
332332
}
333333
private SwitchParameter _force;
334334

335-
//
336-
// Oldest switch
337-
//
335+
/// <summary>
336+
/// Oldest switch
337+
/// </summary>
338338
[Parameter(ParameterSetName="FileSet")]
339339
[Parameter(ParameterSetName="GetProviderSet")]
340340
[Parameter(ParameterSetName="GetLogSet")]
@@ -391,18 +391,18 @@ public SwitchParameter Oldest
391391
private const string hashkey_data_lc="data";
392392

393393

394-
//
395-
// BeginProcessing() is invoked once per pipeline: we will load System.Core.dll here
396-
//
394+
/// <summary>
395+
/// BeginProcessing() is invoked once per pipeline: we will load System.Core.dll here
396+
/// </summary>
397397
protected override void BeginProcessing()
398398
{
399399
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
400400
}
401401

402402

403-
//
404-
// EndProcessing() is invoked once per pipeline
405-
//
403+
/// <summary>
404+
/// EndProcessing() is invoked once per pipeline
405+
/// </summary>
406406
protected override void EndProcessing()
407407
{
408408

@@ -426,10 +426,10 @@ protected override void EndProcessing()
426426
}
427427

428428

429-
//
430-
// ProcessRecord() override.
431-
// This is the main entry point for the cmdlet.
432-
//
429+
/// <summary>
430+
/// ProcessRecord() override.
431+
/// This is the main entry point for the cmdlet.
432+
/// </summary>
433433
protected override void ProcessRecord()
434434
{
435435
switch (ParameterSetName)

src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ public void Dispose()
479479
/// A helper reading in a Unicode string with embedded NULLs and splitting it into a StringCollection.
480480
/// </summary>
481481
/// <param name="strNative"></param>
482+
/// <param name="strSize"></param>
482483
/// <param name="strColl"></param>
483484

484485
private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)

src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public string Line
156156
/// Returns the base name of the file containing the matching line.
157157
/// <remarks>
158158
/// It will be the string "InputStream" if the object came from the input stream.
159-
/// This is a readonly propery calculated from <paramref name="Path"/>.
159+
/// This is a readonly property calculated from the path. <see cref="Path"/>
160160
/// </remarks>
161161
/// </summary>
162162
/// <value>The file name</value>

src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public SwitchParameter UseSsl
261261
private SwitchParameter usessl;
262262

263263
/// <summary>
264-
/// Specifies the Port to be used on <paramref name="SmtpServer"/>
264+
/// Specifies the Port to be used on the server. <see cref="SmtpServer"/>
265265
/// </summary>
266266
/// <remarks>
267267
/// Value must be greater than zero.

src/Microsoft.PowerShell.Commands.Utility/commands/utility/sort-object.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public SwitchParameter Descending
2323
set { DescendingOrder = value; }
2424
}
2525
/// <summary>
26-
///
26+
/// This param specifies if only unique objects are filtered.
2727
/// </summary>
2828
/// <value></value>
2929
[Parameter]
@@ -37,7 +37,7 @@ public SwitchParameter Unique
3737

3838

3939
/// <summary>
40-
/// Remove Duplicated from <paramref name="sortedList"/>
40+
/// Remove duplicates.
4141
/// </summary>
4242
private static void RemoveDuplicates(OrderByProperty orderByProperty)
4343
{

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,12 @@ internal static int Start(
286286

287287

288288

289+
#if LINUX
289290
/// <summary>
290-
///
291+
///
291292
/// The break handler for the program. Dispatches a break event to the current Executor.
292-
///
293+
///
293294
/// </summary>
294-
/// <param name="signal"></param>
295-
/// <returns></returns>
296-
#if LINUX
297295
private static void MyBreakHandler(object sender, ConsoleCancelEventArgs args)
298296
{
299297
// Set the Cancel property to true to prevent the process from terminating.
@@ -310,6 +308,13 @@ private static void MyBreakHandler(object sender, ConsoleCancelEventArgs args)
310308
}
311309
}
312310
#else
311+
/// <summary>
312+
///
313+
/// The break handler for the program. Dispatches a break event to the current Executor.
314+
///
315+
/// </summary>
316+
/// <param name="signal"></param>
317+
/// <returns></returns>
313318
private static bool MyBreakHandler(ConsoleControl.ConsoleBreakSignal signal)
314319
{
315320
switch (signal)

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1978,12 +1978,12 @@ private string ReadLineFromConsole(bool endOnTab, string initialContent, bool ca
19781978
#endif
19791979
}
19801980

1981+
#if !LINUX
19811982
/// <summary>
19821983
/// Get the character at the cursor when the user types 'tab' in the middle of line.
19831984
/// </summary>
19841985
/// <param name="cursorPosition">the cursor position where 'tab' is hit</param>
19851986
/// <returns></returns>
1986-
#if !LINUX
19871987
private char GetCharacterUnderCursor(Coordinates cursorPosition)
19881988
{
19891989
Rectangle region = new Rectangle(0, cursorPosition.Y, RawUI.BufferSize.Width - 1, cursorPosition.Y);

src/Microsoft.PowerShell.PSReadLine/ReadLine.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,11 @@ public static void InvokePrompt(ConsoleKeyInfo? key = null, object arg = null)
876876
_singleton.Render();
877877
}
878878

879+
/// <summary>
880+
/// Gets the current prompt as possibly defined by the user through the
881+
/// prompt function, and returns a default prompt if no other is
882+
/// available. Also handles remote prompts.
883+
/// </summary>
879884
public static string GetPrompt()
880885
{
881886
var runspaceIsRemote = _singleton._mockableMethods.RunspaceIsRemote(_singleton._runspace);

0 commit comments

Comments
 (0)