Skip to content

Commit 3b41088

Browse files
author
Kapil Borle
committed
Add xml documentation
1 parent b0fa911 commit 3b41088

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Engine/ScriptAnalyzer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,7 @@ public string Fix(string scriptDefinition)
15471547
/// Fix the violations in the given script text.
15481548
/// </summary>
15491549
/// <param name="text">An object of type `EditableText` that encapsulates the script text to be fixed.</param>
1550+
/// <param name="range">The range in which the fixes are allowed.</param>
15501551
/// <param name="updatedRange">The updated range after the fixes have been applied.</param>
15511552
/// <returns>The same instance of `EditableText` that was passed to the method, but the instance encapsulates the fixed script text. This helps in chaining the Fix method.</returns>
15521553
public EditableText Fix(EditableText text, Range range, out Range updatedRange)

Engine/Settings.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
2323
{
2424
internal enum SettingsMode { None = 0, Auto, File, Hashtable, Preset };
2525

26+
/// <summary>
27+
/// A class to represent the settings provided to ScriptAnalyzer class.
28+
/// </summary>
2629
public class Settings
2730
{
2831
private string filePath;
@@ -37,6 +40,11 @@ public class Settings
3740
public IEnumerable<string> Severities { get { return severities; } }
3841
public Dictionary<string, Dictionary<string, object>> RuleArguments { get { return ruleArguments; } }
3942

43+
/// <summary>
44+
/// Create a settings object from the input object.
45+
/// </summary>
46+
/// <param name="settings">An input object of type Hashtable or string.</param>
47+
/// <param name="presetResolver">A function that takes in a preset and resolves it to a path.</param>
4048
public Settings(object settings, Func<string, string> presetResolver)
4149
{
4250
if (settings == null)
@@ -90,6 +98,10 @@ public Settings(object settings, Func<string, string> presetResolver)
9098
}
9199
}
92100

101+
/// <summary>
102+
/// Create a Settings object from the input object.
103+
/// </summary>
104+
/// <param name="settings">An input object of type Hashtable or string.</param>
93105
public Settings(object settings) : this(settings, null)
94106
{
95107
}
@@ -159,6 +171,13 @@ public static string GetSettingPresetFilePath(string settingPreset)
159171
return null;
160172
}
161173

174+
/// <summary>
175+
/// Create a settings object from an input object.
176+
/// </summary>
177+
/// <param name="settingsObj">An input object of type Hashtable or string.</param>
178+
/// <param name="cwd">The path in which to search for a settings file.</param>
179+
/// <param name="outputWriter">An output writer.</param>
180+
/// <returns>An object of Settings type.</returns>
162181
public static Settings Create(object settingsObj, string cwd, IOutputWriter outputWriter)
163182
{
164183
object settingsFound;

0 commit comments

Comments
 (0)