From 20b7ead0a9e72a25167079d8125416781b691213 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 26 Nov 2017 17:35:30 +0000 Subject: [PATCH 1/2] XML documentation fix for CompletionResult: 1 typo, make text start with upper case and add periods at the end. This typo showed up on the official docs site: https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.completionresult.-ctor?view=powershellsdk-1.1.0#System_Management_Automation_CompletionResult__ctor_System_String_ --- .../CommandCompletion/CompletionResult.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs index fd9cf08a69f..54591ca6002 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs @@ -12,7 +12,7 @@ namespace System.Management.Automation using System; /// - /// Possible types of CompletionResults + /// Possible types of CompletionResults. /// public enum CompletionResultType { @@ -64,7 +64,7 @@ public enum CompletionResultType } /// - /// Class used to store a tab completion or Intellisense result + /// Class used to store a tab completion or Intellisense result. /// public class CompletionResult { @@ -94,7 +94,7 @@ public class CompletionResult private static readonly CompletionResult s_nullInstance = new CompletionResult(); /// - /// Gets the text to be used as the auto completion result + /// Gets the text to be used as the auto completion result. /// public string CompletionText { @@ -109,7 +109,7 @@ public string CompletionText } /// - /// Gets the text to be displayed in a list + /// Gets the text to be displayed in a list. /// public string ListItemText { @@ -124,7 +124,7 @@ public string ListItemText } /// - /// Gets the type of completion result + /// Gets the type of completion result. /// public CompletionResultType ResultType { @@ -139,7 +139,7 @@ public CompletionResultType ResultType } /// - /// Gets the text for the tooltip with details to be displayed about the object + /// Gets the text for the tooltip with details to be displayed about the object. /// public string ToolTip { @@ -154,7 +154,7 @@ public string ToolTip } /// - /// Gets the null instance of type CompletionResult + /// Gets the null instance of type CompletionResult. /// internal static CompletionResult Null { @@ -162,12 +162,12 @@ internal static CompletionResult Null } /// - /// Initializes a new instance of the CompletionResult class + /// Initializes a new instance of the CompletionResult class. /// - /// the text to be used as the auto completion result - /// he text to be displayed in a list - /// the type of completion result - /// the text for the tooltip with details to be displayed about the object + /// The text to be used as the auto completion result. + /// The text to be displayed in a list. + /// The type of completion result. + /// The text for the tooltip with details to be displayed about the object. public CompletionResult(string completionText, string listItemText, CompletionResultType resultType, string toolTip) { if (String.IsNullOrEmpty(completionText)) @@ -198,9 +198,9 @@ public CompletionResult(string completionText, string listItemText, CompletionRe /// - /// Initializes a new instance of this class internally if the result out of TabExpansion is a string + /// Initializes a new instance of this class internally if the result out of TabExpansion is a string. /// - /// completion text + /// Completion text. public CompletionResult(string completionText) : this(completionText, completionText, CompletionResultType.Text, completionText) { From 56b2fefe057678c94a8a09c04dba8567cb4783c5 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 27 Nov 2017 08:11:30 +0000 Subject: [PATCH 2/2] Add periods to private members as well as suggested in PR. --- .../CommandCompletion/CompletionResult.cs | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs index 54591ca6002..2109c6b2d0e 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs @@ -16,46 +16,46 @@ namespace System.Management.Automation /// public enum CompletionResultType { - /// An unknown result type, kept as text only + /// An unknown result type, kept as text only. Text = 0, - /// A history result type like the items out of get-history + /// A history result type like the items out of get-history. History = 1, - /// A command result type like the items out of get-command + /// A command result type like the items out of get-command. Command = 2, - /// A provider item + /// A provider item. ProviderItem = 3, - /// A provider container + /// A provider container. ProviderContainer = 4, - /// A property result type like the property items out of get-member + /// A property result type like the property items out of get-member. Property = 5, - /// A method result type like the method items out of get-member + /// A method result type like the method items out of get-member. Method = 6, - /// A parameter name result type like the Parameters property out of get-command items + /// A parameter name result type like the Parameters property out of get-command items. ParameterName = 7, - /// A parameter value result type + /// A parameter value result type. ParameterValue = 8, - /// A variable result type like the items out of get-childitem variable: + /// A variable result type like the items out of get-childitem variable. Variable = 9, - /// A namespace + /// A namespace. Namespace = 10, - /// A type name + /// A type name. Type = 11, - /// A keyword + /// A keyword. Keyword = 12, - /// A dynamic keyword + /// A dynamic keyword. DynamicKeyword = 13, // If a new enum is added, there is a range test that uses DynamicKeyword for parameter validation @@ -69,27 +69,27 @@ public enum CompletionResultType public class CompletionResult { /// - /// Text to be used as the auto completion result + /// Text to be used as the auto completion result. /// private string _completionText; /// - /// Text to be displayed in a list + /// Text to be displayed in a list. /// private string _listItemText; /// - /// The text for the tooltip with details to be displayed about the object + /// The text for the tooltip with details to be displayed about the object. /// private string _toolTip; /// - /// Type of completion result + /// Type of completion result. /// private CompletionResultType _resultType; /// - /// Private member for null instance + /// Private member for null instance. /// private static readonly CompletionResult s_nullInstance = new CompletionResult();