From f6d515e44bcc201b48fee84099081baf485c0d7a Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 23 Nov 2020 00:52:30 +0000 Subject: [PATCH 1/5] Use correct paramref tag --- .../commands/utility/MatchString.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs index 155a134ca7b..3cd3418341a 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs @@ -457,7 +457,7 @@ public CircularBuffer(int capacity) /// The index to wrap. /// If is out of range. /// - /// The actual index that + /// The actual index that /// maps to. /// private int WrapIndex(int zeroBasedIndex) From eeae288abcfded31dfd67046e8a2818919b54693 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 23 Nov 2020 00:54:32 +0000 Subject: [PATCH 2/5] End summary tag in correct position --- .../commands/management/Process.cs | 2 +- .../commands/utility/Measure-Object.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs index 1334567ffb0..1884894cd08 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs @@ -1387,9 +1387,9 @@ private void StopDependentService(Process process) /// /// Stops the given process throws non terminating error if can't. + /// /// Process to be stopped. /// True if process stopped successfully else false. - /// private void StopProcess(Process process) { Exception exception = null; diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs index 6898b0cfc4e..6ea48b62420 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs @@ -496,8 +496,8 @@ protected override void ProcessRecord() /// Analyze an object on a property-by-property basis instead /// of as a simple value. /// Side effects: Updates statistics. - /// The object to analyze. /// + /// The object to analyze. private void AnalyzeObjectProperties(PSObject inObj) { // Keep track of which properties are counted for an @@ -556,9 +556,9 @@ private void AnalyzeObjectProperties(PSObject inObj) /// /// Analyze a value for generic/text statistics. /// Side effects: Updates statistics. May set nonNumericError. + /// /// The property this value corresponds to. /// The value to analyze. - /// private void AnalyzeValue(string propertyName, object objValue) { if (propertyName == null) @@ -746,9 +746,9 @@ internal static int CountLine(string inStr) /// /// Update text statistics. + /// /// The text to analyze. /// The Statistics object to update. - /// private void AnalyzeString(string strValue, Statistics stat) { if (_measureCharacters) @@ -761,9 +761,9 @@ private void AnalyzeString(string strValue, Statistics stat) /// /// Update number statistics. + /// /// The number to analyze. /// The Statistics object to update. - /// private void AnalyzeNumber(double numValue, Statistics stat) { if (_measureSum || _measureAverage || _measureStandardDeviation) @@ -852,10 +852,10 @@ protected override void EndProcessing() /// /// Create a MeasureInfo object for generic stats. - /// The statistics to use. - /// A new GenericMeasureInfo object. /// + /// The statistics to use. /// + /// A new GenericMeasureInfo object. private MeasureInfo CreateGenericMeasureInfo(Statistics stat, bool shouldUseGenericMeasureInfo) { double? sum = null; @@ -940,9 +940,9 @@ private MeasureInfo CreateGenericMeasureInfo(Statistics stat, bool shouldUseGene /// /// Create a MeasureInfo object for text stats. + /// /// The statistics to use. /// A new TextMeasureInfo object. - /// private TextMeasureInfo CreateTextMeasureInfo(Statistics stat) { TextMeasureInfo tmi = new TextMeasureInfo(); From 6182bf73ef3aeaac790f824eee4ff26992f35161 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 23 Nov 2020 01:00:20 +0000 Subject: [PATCH 3/5] Escape generic identifiers correctly --- .../CimSessionProxy.cs | 2 +- .../utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs index 333d9816e0c..ec0ac65eab3 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs @@ -943,7 +943,7 @@ public CimResponseType PromptUser(string message, CimPromptType prompt) /// /// - /// Handle async event triggered by + /// Handle async event triggered by /// /// /// Object triggered the event. diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs index 50cdda7b1ac..d0e94a4c4fd 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs @@ -1912,7 +1912,7 @@ private void AddMultipartContent(object fieldName, object fieldValue, MultipartF } /// - /// Gets a from the supplied field name and field value. Uses to convert the objects to strings. + /// Gets a from the supplied field name and field value. Uses to convert the objects to strings. /// /// The Field Name to use for the /// The Field Value to use for the @@ -1929,7 +1929,7 @@ private StringContent GetMultipartStringContent(object fieldName, object fieldVa } /// - /// Gets a from the supplied field name and . Uses to convert the fieldname to a string. + /// Gets a from the supplied field name and . Uses to convert the fieldname to a string. /// /// The Field Name to use for the /// The to use for the From bb945a969118e32b6d0d121f147432918fbd8e83 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 23 Nov 2020 01:38:53 +0000 Subject: [PATCH 4/5] Fix CS1574 https://docs.microsoft.com/dotnet/csharp/misc/cs1574 --- .../utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs index d0e94a4c4fd..6e8e5c471b6 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs @@ -1912,7 +1912,7 @@ private void AddMultipartContent(object fieldName, object fieldValue, MultipartF } /// - /// Gets a from the supplied field name and field value. Uses to convert the objects to strings. + /// Gets a from the supplied field name and field value. Uses to convert the objects to strings. /// /// The Field Name to use for the /// The Field Value to use for the @@ -1929,7 +1929,7 @@ private StringContent GetMultipartStringContent(object fieldName, object fieldVa } /// - /// Gets a from the supplied field name and . Uses to convert the fieldname to a string. + /// Gets a from the supplied field name and . Uses to convert the fieldname to a string. /// /// The Field Name to use for the /// The to use for the From 827b904af54597402cd880cc202a1988cf1bcad7 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 23 Nov 2020 02:03:20 +0000 Subject: [PATCH 5/5] Remove extraneous space --- .../commands/management/Process.cs | 2 +- .../engine/hostifaces/History.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs index 1884894cd08..35697db56ba 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs @@ -1388,7 +1388,7 @@ private void StopDependentService(Process process) /// /// Stops the given process throws non terminating error if can't. /// - /// Process to be stopped. + /// Process to be stopped. /// True if process stopped successfully else false. private void StopProcess(Process process) { diff --git a/src/System.Management.Automation/engine/hostifaces/History.cs b/src/System.Management.Automation/engine/hostifaces/History.cs index c3c43ef379c..5af0cf2747d 100644 --- a/src/System.Management.Automation/engine/hostifaces/History.cs +++ b/src/System.Management.Automation/engine/hostifaces/History.cs @@ -1897,10 +1897,10 @@ private void ClearHistoryByCmdLine() /// /// Clears the session history based on the input parameter - /// Id of the entry to be cleared. - /// Count of entries to be cleared. - /// Cmdline string to be cleared. - /// Order of the entries. + /// Id of the entry to be cleared. + /// Count of entries to be cleared. + /// Cmdline string to be cleared. + /// Order of the entries. /// Nothing. /// private void ClearHistoryEntries(long id, int count, string cmdline, SwitchParameter newest)