Simplified combining dictionaries in Telemetry
This commit is contained in:
parent
dae5099ffb
commit
139fc86dbc
1 changed files with 2 additions and 16 deletions
|
@ -140,16 +140,9 @@ namespace Microsoft.DotNet.Cli.Telemetry
|
|||
if (measurements != null)
|
||||
{
|
||||
foreach (KeyValuePair<string, double> measurement in measurements)
|
||||
{
|
||||
if (eventMeasurements.ContainsKey(measurement.Key))
|
||||
{
|
||||
eventMeasurements[measurement.Key] = measurement.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventMeasurements.Add(measurement.Key, measurement.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return eventMeasurements;
|
||||
}
|
||||
|
@ -160,16 +153,9 @@ namespace Microsoft.DotNet.Cli.Telemetry
|
|||
{
|
||||
var eventProperties = new Dictionary<string, string>(_commonProperties);
|
||||
foreach (KeyValuePair<string, string> property in properties)
|
||||
{
|
||||
if (eventProperties.ContainsKey(property.Key))
|
||||
{
|
||||
eventProperties[property.Key] = property.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventProperties.Add(property.Key, property.Value);
|
||||
}
|
||||
}
|
||||
return eventProperties;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue