Skip to content

Commit 1bbc4df

Browse files
committed
Resolve review feedback
1 parent dc0c059 commit 1bbc4df

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

src/Common/Commands.Common/MetricHelper.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using System;
2222
using System.Collections.Generic;
2323
using System.Diagnostics;
24+
using System.Linq;
2425
using System.Net.NetworkInformation;
2526
using System.Security.Cryptography;
2627
using System.Text;
@@ -62,15 +63,12 @@ private static string HashMacAddress
6263
if (_hashMacAddress == string.Empty)
6364
{
6465
_hashMacAddress = null;
65-
var nics = NetworkInterface.GetAllNetworkInterfaces();
66-
foreach (var nic in nics)
66+
var macAddress = NetworkInterface.GetAllNetworkInterfaces()
67+
.FirstOrDefault(nic => nic.OperationalStatus == OperationalStatus.Up)?
68+
.GetPhysicalAddress().ToString();
69+
if (macAddress != null)
6770
{
68-
if (nic.OperationalStatus == OperationalStatus.Up)
69-
{
70-
var macAddress = nic.GetPhysicalAddress().ToString();
71-
_hashMacAddress = GenerateSha256HashString(macAddress).Replace("-", string.Empty).ToLowerInvariant();
72-
break;
73-
}
71+
_hashMacAddress = GenerateSha256HashString(macAddress).Replace("-", string.Empty).ToLowerInvariant();
7472
}
7573
}
7674

src/Common/Commands.Common/Properties/Resources.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,8 @@ The file needs to be a PowerShell script (.ps1 or .psm1).</value>
14731473
The data is anonymous and does not include commandline argument values.
14741474
The data is collected by Microsoft.
14751475

1476-
Use the Disable-AzureRmDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module. To disable data collection: PS &amp;gt; Disable-AzureRmDataCollection.
1477-
Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module. To enable data collection: PS &amp;gt; Enable-AzureRmDataCollection.</value>
1476+
Use the Disable-AzureRmDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module. To disable data collection: PS &gt; Disable-AzureRmDataCollection.
1477+
Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module. To enable data collection: PS &gt; Enable-AzureRmDataCollection.</value>
14781478
</data>
14791479
<data name="DataCollectionActivity" xml:space="preserve">
14801480
<value>Microsoft Azure PowerShell Data Collection Confirmation</value>
@@ -1586,7 +1586,7 @@ Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet c
15861586
The data is anonymous and does not include commandline argument values.
15871587
The data is collected by Microsoft.
15881588

1589-
Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS &amp;gt; Disable-AzureDataCollection.
1590-
Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS &amp;gt; Enable-AzureDataCollection.</value>
1589+
Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS &gt; Disable-AzureDataCollection.
1590+
Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS &gt; Enable-AzureDataCollection.</value>
15911591
</data>
15921592
</root>

src/ResourceManager/Common/Commands.ResourceManager.Common/Properties/Resources.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/Common/Commands.ResourceManager.Common/Properties/Resources.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
The data is anonymous and does not include commandline argument values.
141141
The data is collected by Microsoft.
142142

143-
Use the Disable-AzureRmDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module. To disable data collection: PS &amp;gt; Disable-AzureRmDataCollection.
144-
Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module. To enable data collection: PS &amp;gt; Enable-AzureRmDataCollection.</value>
143+
Use the Disable-AzureRmDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module. To disable data collection: PS &gt; Disable-AzureRmDataCollection.
144+
Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module. To enable data collection: PS &gt; Enable-AzureRmDataCollection.</value>
145145
</data>
146146
<data name="DataCollectionSaveFileInformation" xml:space="preserve">
147147
<value>The setting profile has been saved to the following path '{0}'.</value>
@@ -201,7 +201,7 @@ Use the Enable-AzureRmDataCollection cmdlet to turn the feature On. The cmdlet c
201201
The data is anonymous and does not include commandline argument values.
202202
The data is collected by Microsoft.
203203

204-
Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS &amp;gt; Disable-AzureDataCollection.
205-
Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS &amp;gt; Enable-AzureDataCollection.</value>
204+
Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS &gt; Disable-AzureDataCollection.
205+
Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS &gt; Enable-AzureDataCollection.</value>
206206
</data>
207207
</root>

0 commit comments

Comments
 (0)