From a775d8741e91d1bffce97ac6eb0de109e641f3e7 Mon Sep 17 00:00:00 2001 From: Beisi Zhou Date: Mon, 9 May 2022 15:50:11 +0800 Subject: [PATCH] Fix comments in code to generate good XML file --- src/Accounts/Accounts/Common/ScopeHelpers.cs | 7 ++++--- .../Accounts/CommonModule/TelemetryProvider.cs | 16 ++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Accounts/Accounts/Common/ScopeHelpers.cs b/src/Accounts/Accounts/Common/ScopeHelpers.cs index 54df6ca36910..e3f11e08c427 100644 --- a/src/Accounts/Accounts/Common/ScopeHelpers.cs +++ b/src/Accounts/Accounts/Common/ScopeHelpers.cs @@ -61,11 +61,12 @@ public static ContextModificationScope GetContextModificationScopeForProcess(Deb } /// - /// Get the context modification scope for the current user. This will be 'Process' if changes should - /// only affect the current PowerShell session, or 'CurrentUser' if any changes should be global. + /// Get the context modification scope for the current user. This will be 'Process' if changes should + /// only affect the current PowerShell session, or 'CurrentUser' if any changes should be global. /// + /// The PowerShell session to be affected /// A writer to write debug messages - /// 'Process' if all changes should only impact the current session, or 'CurrentUser' if + /// 'Process' if all changes should only impact the current session, or 'CurrentUser' if /// changes should be global. public static ContextModificationScope GetContextModificationScopeForUser(IAzureSession session, DebugWriter writer) { diff --git a/src/Accounts/Accounts/CommonModule/TelemetryProvider.cs b/src/Accounts/Accounts/CommonModule/TelemetryProvider.cs index 852676d76025..4588a42ffbf8 100644 --- a/src/Accounts/Accounts/CommonModule/TelemetryProvider.cs +++ b/src/Accounts/Accounts/CommonModule/TelemetryProvider.cs @@ -102,21 +102,21 @@ public static TelemetryProvider Create(bool collect, IEventStore store) } /// - /// Log a telemtry event + /// Log a telemetry event /// - /// The event to log - public virtual void LogEvent(string key) + /// The event to log + public virtual void LogEvent(string qosEventKey) { var dataCollection = _dataCollectionProfile.EnableAzureDataCollection; var enabled = dataCollection.HasValue ? dataCollection.Value : true; - AzurePSQoSEvent qos; - if (this.TryGetValue(key, out qos)) + AzurePSQoSEvent qosEvent; + if (this.TryGetValue(qosEventKey, out qosEvent)) { - qos.FinishQosEvent(); - _helper.LogQoSEvent(qos, enabled, enabled); + qosEvent.FinishQosEvent(); + _helper.LogQoSEvent(qosEvent, enabled, enabled); _helper.FlushMetric(); - this.Remove(key); + this.Remove(qosEventKey); } }