Skip to content

Commit 2f8b6da

Browse files
author
Kapil Borle
committed
Add xml documentation
1 parent 06a5de2 commit 2f8b6da

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Engine/Commands/InvokeFormatterCommand.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,28 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
1818
{
1919
using PSSASettings = Microsoft.Windows.PowerShell.ScriptAnalyzer.Settings;
2020

21+
/// <summary>
22+
/// A cmdlet to format a PowerShell script text.
23+
/// </summary>
2124
[Cmdlet(VerbsLifecycle.Invoke, "Formatter")]
2225
public class InvokeFormatterCommand : PSCmdlet, IOutputWriter
2326
{
2427
private const string defaultSettingsPreset = "CodeFormatting";
2528
private Settings defaultSettings;
2629
private Settings inputSettings;
2730

31+
/// <summary>
32+
/// The script text to be formated.
33+
///
34+
/// *NOTE*: Unlike ScriptBlock parameter, the ScriptDefinition parameter require a string value.
35+
/// </summary>
2836
[ParameterAttribute(Mandatory = true)]
2937
[ValidateNotNull]
3038
public string ScriptDefinition { get; set; }
3139

40+
/// <summary>
41+
/// A settings hashtable or a path to a PowerShell data file (.psd1) file that contains the settings.
42+
/// </summary>
3243
[Parameter(Mandatory = false)]
3344
[ValidateNotNull]
3445
public object Settings { get; set; }

Engine/Formatter.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@
33

44
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
55
{
6+
/// <summary>
7+
/// A class to provide code formatting capability.
8+
/// </summary>
69
public class Formatter
710
{
11+
/// <summary>
12+
/// Format a powershell script.
13+
/// </summary>
14+
/// <param name="scriptDefinition">A string representing a powershell script.</param>
15+
/// <param name="settings">Settings to be used for formatting</param>
16+
/// <param name="range">The range in which formatting should take place.</param>
17+
/// <param name="cmdlet">The cmdlet object that calls this method.</param>
18+
/// <returns></returns>
819
public static string Format<TCmdlet>(
920
string scriptDefinition,
1021
Settings settings,

0 commit comments

Comments
 (0)