Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dabhattimsft authored and Darshak Bhatti committed May 15, 2024
1 parent eed753f commit 49c1871
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/NavConfig.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"assembly": "DevHome.Utilities",
"viewFullName": "DevHome.Utilities.Views.UtilitiesMainPageView",
"viewModelFullName": "DevHome.Utilities.ViewModels.UtilitiesMainPageViewModel",
"icon": "ED35"
"icon": "ECED"
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions tools/Utilities/src/ViewModels/UtilityViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class UtilityViewModel : INotifyPropertyChanged
private readonly ILogger _log = Log.ForContext("SourceContext", nameof(UtilityViewModel));
private readonly IExperimentationService? experimentationService;
private readonly string? experimentalFeature;
private readonly string exeName;
private readonly string _exeName;
#nullable disable

public bool Visible
Expand Down Expand Up @@ -76,7 +76,7 @@ protected virtual void OnPropertyChanged(string propertyName)
#nullable enable
public UtilityViewModel(string exeName, IExperimentationService? experimentationService = null, string? experimentalFeature = null)
{
this.exeName = exeName;
this._exeName = exeName;
this.experimentationService = experimentationService;
this.experimentalFeature = experimentalFeature;
LaunchCommand = new RelayCommand(Launch);
Expand All @@ -86,12 +86,12 @@ public UtilityViewModel(string exeName, IExperimentationService? experimentation

private void Launch()
{
_log.Information("Launching {ExeName}, as admin: {RunAsAdmin}", exeName, launchAsAdmin);
_log.Information($"Launching {_exeName}, as admin: {launchAsAdmin}");

// We need to start the process with ShellExecute to run elevated
var processStartInfo = new ProcessStartInfo
{
FileName = exeName,
FileName = _exeName,
UseShellExecute = true,

Verb = launchAsAdmin ? "runas" : "open",
Expand All @@ -108,7 +108,7 @@ private void Launch()
}
catch (Exception ex)
{
_log.Error(ex, "Failed to start process {ExeName}", exeName);
_log.Error(ex, "Failed to start process {ExeName}", _exeName);
}

TelemetryFactory.Get<DevHome.Telemetry.ITelemetry>().Log("Utilities_UtilitiesLaunchEvent", LogLevel.Critical, new UtilitiesLaunchEvent(Title, launchAsAdmin), null);
Expand Down

0 comments on commit 49c1871

Please sign in to comment.