diff --git a/Source/NETworkManager/Controls/PowerShellControl.xaml.cs b/Source/NETworkManager/Controls/PowerShellControl.xaml.cs
index f976aec487..099dffd42f 100644
--- a/Source/NETworkManager/Controls/PowerShellControl.xaml.cs
+++ b/Source/NETworkManager/Controls/PowerShellControl.xaml.cs
@@ -103,7 +103,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)((ActualHeight - 20) * dpi.DpiScaleY);
WindowHost.Width = (int)((ActualWidth - 20) * dpi.DpiScaleX);
- Connect().ConfigureAwait(false);
+ _ = Connect();
_initialized = true;
}
@@ -248,7 +248,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
public void CloseTab()
diff --git a/Source/NETworkManager/Controls/PuTTYControl.xaml.cs b/Source/NETworkManager/Controls/PuTTYControl.xaml.cs
index 366746ca36..922f77dcaf 100644
--- a/Source/NETworkManager/Controls/PuTTYControl.xaml.cs
+++ b/Source/NETworkManager/Controls/PuTTYControl.xaml.cs
@@ -104,7 +104,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)((ActualHeight - 20) * dpi.DpiScaleY);
WindowHost.Width = (int)((ActualWidth - 20) * dpi.DpiScaleX);
- Connect().ConfigureAwait(false);
+ _ = Connect();
_initialized = true;
}
@@ -262,7 +262,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
public void RestartSession()
diff --git a/Source/NETworkManager/Controls/TigerVNCControl.xaml.cs b/Source/NETworkManager/Controls/TigerVNCControl.xaml.cs
index eb66089b54..863ab057a3 100644
--- a/Source/NETworkManager/Controls/TigerVNCControl.xaml.cs
+++ b/Source/NETworkManager/Controls/TigerVNCControl.xaml.cs
@@ -89,7 +89,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)(ActualHeight * dpi.DpiScaleY);
WindowHost.Width = (int)(ActualWidth * dpi.DpiScaleX);
- Connect().ConfigureAwait(false);
+ _ = Connect();
_initialized = true;
}
@@ -233,7 +233,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
public void CloseTab()
diff --git a/Source/NETworkManager/ProfileDialogManager.cs b/Source/NETworkManager/ProfileDialogManager.cs
index aa6d9e3e2b..86f35ffeec 100644
--- a/Source/NETworkManager/ProfileDialogManager.cs
+++ b/Source/NETworkManager/ProfileDialogManager.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -581,7 +581,7 @@ void CloseChild()
switch (instance.SelectedMethod.Method)
{
case ProfileImportSource.ActiveDirectory:
- ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, previousState: null).ConfigureAwait(false);
+ _ = ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, previousState: null);
break;
}
}, _ => CloseChild());
@@ -614,10 +614,9 @@ void CloseChild()
{
CloseChild();
- ShowImportProfilesResultDialog(parentWindow, viewModel, targetGroup, candidates,
+ _ = ShowImportProfilesResultDialog(parentWindow, viewModel, targetGroup, candidates,
ProfileImportSource.ActiveDirectory, Strings.ImportProfiles_Source_ActiveDirectory,
- backToSourceCallback: () => ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, searchViewModel).ConfigureAwait(false)
- ).ConfigureAwait(false);
+ backToSourceCallback: () => _ = ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, searchViewModel));
}, CloseChild, previousState);
childWindow.Title = Strings.ImportComputersFromActiveDirectory;
diff --git a/Source/NETworkManager/ViewModels/BitCalculatorViewModel.cs b/Source/NETworkManager/ViewModels/BitCalculatorViewModel.cs
index 5661a254b6..01a24481e0 100644
--- a/Source/NETworkManager/ViewModels/BitCalculatorViewModel.cs
+++ b/Source/NETworkManager/ViewModels/BitCalculatorViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -197,7 +197,7 @@ private void CalculateAction()
///
/// Gets the command to export the result.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the result.
diff --git a/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs b/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
index 56c7f903b6..2f303d7fe1 100644
--- a/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization;
@@ -65,7 +65,7 @@ public ConnectionsViewModel()
};
// Get connections
- Refresh(true).ConfigureAwait(false);
+ _ = Refresh(true);
// Auto refresh
_autoRefreshTimer.Tick += AutoRefreshTimer_Tick;
@@ -303,7 +303,7 @@ public string StatusMessage
///
/// Gets the command to refresh the connections.
///
- public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
+ public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);
///
/// Checks if the refresh command can be executed.
@@ -332,7 +332,7 @@ private async Task RefreshAction()
///
/// Gets the command to export the connections.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the connections.
diff --git a/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs b/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
index 3ef5e5491c..b78945e731 100644
--- a/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -378,9 +378,8 @@ private void LookupProfileAction()
///
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.DNSLookup)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.DNSLookup);
}
///
@@ -401,8 +400,7 @@ private bool ModifyProfile_CanExecute(object obj)
///
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -415,8 +413,7 @@ private void EditProfileAction()
///
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -429,9 +426,8 @@ private void CopyAsProfileAction()
///
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -444,9 +440,8 @@ private void DeleteProfileAction()
///
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs b/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
index 5938a31ce2..d9dcee5604 100644
--- a/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using DnsClient;
+using DnsClient;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
@@ -299,7 +299,7 @@ private void LoadSettings()
///
private void AddDNSServerAction()
{
- AddDNSServer().ConfigureAwait(false);
+ _ = AddDNSServer();
}
///
@@ -312,7 +312,7 @@ private void AddDNSServerAction()
///
private void EditDNSServerAction()
{
- EditDNSServer().ConfigureAwait(false);
+ _ = EditDNSServer();
}
///
@@ -325,7 +325,7 @@ private void EditDNSServerAction()
///
private void DeleteDNSServerAction()
{
- DeleteDNSServer().ConfigureAwait(false);
+ _ = DeleteDNSServer();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/DNSLookupViewModel.cs b/Source/NETworkManager/ViewModels/DNSLookupViewModel.cs
index 3d17df95dd..0f38a429a9 100644
--- a/Source/NETworkManager/ViewModels/DNSLookupViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DNSLookupViewModel.cs
@@ -1,4 +1,4 @@
-using DnsClient;
+using DnsClient;
using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
@@ -288,7 +288,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Host))
- QueryAsync().ConfigureAwait(false);
+ _ = QueryAsync();
_firstLoad = false;
}
@@ -343,7 +343,7 @@ private bool Query_CanExecute(object parameter)
private void QueryAction()
{
if (!IsRunning)
- QueryAsync().ConfigureAwait(false);
+ _ = QueryAsync();
}
///
@@ -356,7 +356,7 @@ private void QueryAction()
///
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/DiscoveryProtocolViewModel.cs b/Source/NETworkManager/ViewModels/DiscoveryProtocolViewModel.cs
index 7b917a8e3d..c909d4386d 100644
--- a/Source/NETworkManager/ViewModels/DiscoveryProtocolViewModel.cs
+++ b/Source/NETworkManager/ViewModels/DiscoveryProtocolViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Export;
@@ -275,7 +275,7 @@ private void LoadSettings()
///
/// Gets the command to restart the application as administrator.
///
- public ICommand RestartAsAdminCommand => new RelayCommand(_ => RestartAsAdminAction().ConfigureAwait(false));
+ public ICommand RestartAsAdminCommand => new RelayCommand(parameter => { _ = RestartAsAdminAction(); });
///
/// Action to restart the application as administrator.
@@ -295,7 +295,7 @@ private async Task RestartAsAdminAction()
///
/// Gets the command to start the capture.
///
- public ICommand CaptureCommand => new RelayCommand(_ => CaptureAction().ConfigureAwait(false), Capture_CanExecute);
+ public ICommand CaptureCommand => new RelayCommand(parameter => { _ = CaptureAction(); }, Capture_CanExecute);
private bool Capture_CanExecute(object _) => ConfigurationManager.Current.IsAdmin && !IsCapturing;
@@ -337,7 +337,7 @@ private async Task CaptureAction()
///
/// Gets the command to export the result.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the result.
diff --git a/Source/NETworkManager/ViewModels/FirewallViewModel.cs b/Source/NETworkManager/ViewModels/FirewallViewModel.cs
index 14aadf7100..6ada313a22 100644
--- a/Source/NETworkManager/ViewModels/FirewallViewModel.cs
+++ b/Source/NETworkManager/ViewModels/FirewallViewModel.cs
@@ -380,7 +380,7 @@ public FirewallViewModel()
};
// Load firewall rules
- Refresh(true).ConfigureAwait(false);
+ _ = Refresh(true);
// Profiles
CreateTags();
@@ -423,7 +423,7 @@ private void LoadSettings()
/// Gets the command to refresh the list of firewall rules from the system.
/// Disabled while a refresh is already in progress.
///
- public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
+ public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);
///
/// Returns when no refresh is currently running.
@@ -439,7 +439,7 @@ private void LoadSettings()
/// Gets the command to open the dialog for adding a new firewall rule.
/// Only enabled when the application is running as administrator.
///
- public ICommand AddRuleCommand => new RelayCommand(_ => AddRule().ConfigureAwait(false), _ => ModifyRule_CanExecute());
+ public ICommand AddRuleCommand => new RelayCommand(parameter => { _ = AddRule(); }, _ => ModifyRule_CanExecute());
///
/// Opens the add-firewall-rule dialog. On confirmation, creates the rule via PowerShell
@@ -484,13 +484,13 @@ private async Task AddRule()
/// Gets the command to enable the selected firewall rule.
/// Only executable when the rule is currently disabled and modification is allowed.
///
- public ICommand EnableRuleCommand => new RelayCommand(_ => SetRuleEnabled(SelectedResult, true).ConfigureAwait(false), _ => ModifyRule_CanExecute() && SelectedResult is { IsEnabled: false });
+ public ICommand EnableRuleCommand => new RelayCommand(parameter => { _ = SetRuleEnabled(SelectedResult, true); }, _ => ModifyRule_CanExecute() && SelectedResult is { IsEnabled: false });
///
/// Gets the command to disable the selected firewall rule.
/// Only executable when the rule is currently enabled and modification is allowed.
///
- public ICommand DisableRuleCommand => new RelayCommand(_ => SetRuleEnabled(SelectedResult, false).ConfigureAwait(false), _ => ModifyRule_CanExecute() && SelectedResult is { IsEnabled: true });
+ public ICommand DisableRuleCommand => new RelayCommand(parameter => { _ = SetRuleEnabled(SelectedResult, false); }, _ => ModifyRule_CanExecute() && SelectedResult is { IsEnabled: true });
///
/// Enables or disables the given via PowerShell,
@@ -523,7 +523,7 @@ private async Task SetRuleEnabled(FirewallRule rule, bool enabled)
/// Gets the command to open the dialog for editing the selected firewall rule.
/// Only executable when a rule is selected and modification is allowed.
///
- public ICommand EditRuleCommand => new RelayCommand(_ => EditRule().ConfigureAwait(false), _ => ModifyRule_CanExecute() && SelectedResult != null);
+ public ICommand EditRuleCommand => new RelayCommand(parameter => { _ = EditRule(); }, _ => ModifyRule_CanExecute() && SelectedResult != null);
///
/// Opens the edit-firewall-rule dialog pre-filled with the selected rule's properties.
@@ -570,7 +570,7 @@ private async Task EditRule()
/// Gets the command to permanently delete the selected firewall rule.
/// Only executable when a rule is selected and modification is allowed.
///
- public ICommand DeleteRuleCommand => new RelayCommand(_ => DeleteRule().ConfigureAwait(false), _ => ModifyRule_CanExecute() && SelectedResult != null);
+ public ICommand DeleteRuleCommand => new RelayCommand(parameter => { _ = DeleteRule(); }, _ => ModifyRule_CanExecute() && SelectedResult != null);
///
/// Shows a confirmation dialog and, if confirmed, deletes the selected firewall rule
@@ -618,7 +618,7 @@ private static bool ModifyRule_CanExecute()
///
/// Gets the command to restart the application with administrator privileges.
///
- public ICommand RestartAsAdminCommand => new RelayCommand(_ => RestartAsAdminAction().ConfigureAwait(false));
+ public ICommand RestartAsAdminCommand => new RelayCommand(parameter => { _ = RestartAsAdminAction(); });
///
/// Restarts the application elevated. Shows an error dialog if the restart fails.
@@ -639,7 +639,7 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
///
/// Gets the command to export the current firewall rule list to a file.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Opens the export child window and writes the selected or all firewall rules to the
@@ -699,9 +699,8 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
///
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Firewall)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Firewall);
}
///
@@ -722,8 +721,7 @@ private bool ModifyProfile_CanExecute(object obj)
///
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -736,8 +734,7 @@ private void EditProfileAction()
///
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -750,9 +747,8 @@ private void CopyAsProfileAction()
///
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -765,9 +761,8 @@ private void DeleteProfileAction()
///
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
@@ -852,7 +847,7 @@ private void CollapseAllProfileGroupsAction()
///
/// Gets the command to open the Windows Firewall management console (WF.msc).
///
- public ICommand OpenWindowsFirewallCommand => new RelayCommand(_ => OpenWindowsFirewallAction().ConfigureAwait(false));
+ public ICommand OpenWindowsFirewallCommand => new RelayCommand(parameter => { _ = OpenWindowsFirewallAction(); });
///
/// Action to open the Windows Firewall management console (WF.msc).
diff --git a/Source/NETworkManager/ViewModels/HostsFileEditorViewModel.cs b/Source/NETworkManager/ViewModels/HostsFileEditorViewModel.cs
index 3abb776105..0b69b39d89 100644
--- a/Source/NETworkManager/ViewModels/HostsFileEditorViewModel.cs
+++ b/Source/NETworkManager/ViewModels/HostsFileEditorViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -196,12 +196,12 @@ public HostsFileEditorViewModel()
};
// Get hosts file entries
- Refresh(true).ConfigureAwait(false);
+ _ = Refresh(true);
// Watch hosts file for changes
HostsFileEditor.HostsFileChanged += (_, _) =>
{
- Application.Current.Dispatcher.Invoke(() => { Refresh().ConfigureAwait(false); });
+ Application.Current.Dispatcher.Invoke(() => { _ = Refresh(); });
};
_isLoading = false;
@@ -221,7 +221,7 @@ private void LoadSettings()
///
/// Gets the command to refresh the entries.
///
- public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
+ public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);
///
/// Checks if the refresh command can be executed.
@@ -248,7 +248,7 @@ private async Task RefreshAction()
///
/// Gets the command to export the entries.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the entries.
@@ -303,7 +303,7 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
/// Gets the command to enable the selected entry.
///
public ICommand EnableEntryCommand =>
- new RelayCommand(_ => EnableEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = EnableEntryAction(); }, ModifyEntry_CanExecute);
///
/// Action to enable the selected entry.
@@ -324,7 +324,7 @@ private async Task EnableEntryAction()
/// Gets the command to disable the selected entry.
///
public ICommand DisableEntryCommand =>
- new RelayCommand(_ => DisableEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = DisableEntryAction(); }, ModifyEntry_CanExecute);
///
/// Action to disable the selected entry.
@@ -345,7 +345,7 @@ private async Task DisableEntryAction()
/// Gets the command to add a new entry.
///
public ICommand AddEntryCommand =>
- new RelayCommand(_ => AddEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = AddEntryAction(); }, ModifyEntry_CanExecute);
///
/// Action to add a new entry.
@@ -395,7 +395,7 @@ private async Task AddEntryAction()
/// Gets the command to edit the selected entry.
///
public ICommand EditEntryCommand =>
- new RelayCommand(_ => EditEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = EditEntryAction(); }, ModifyEntry_CanExecute);
///
/// Action to edit the selected entry.
@@ -445,7 +445,7 @@ private async Task EditEntryAction()
/// Gets the command to delete the selected entry.
///
public ICommand DeleteEntryCommand =>
- new RelayCommand(_ => DeleteEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = DeleteEntryAction(); }, ModifyEntry_CanExecute);
///
/// Action to delete the selected entry.
@@ -512,7 +512,7 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
///
/// Gets the command to restart the application as administrator.
///
- public ICommand RestartAsAdminCommand => new RelayCommand(_ => RestartAsAdminAction().ConfigureAwait(false));
+ public ICommand RestartAsAdminCommand => new RelayCommand(parameter => { _ = RestartAsAdminAction(); });
///
/// Action to restart the application as administrator.
@@ -533,7 +533,7 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
///
/// Gets the command to open the hosts file with the system default editor.
///
- public ICommand OpenHostsFileCommand => new RelayCommand(_ => OpenHostsFileAction().ConfigureAwait(false));
+ public ICommand OpenHostsFileCommand => new RelayCommand(parameter => { _ = OpenHostsFileAction(); });
///
/// Opens the hosts file with the system default editor.
diff --git a/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs b/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs
index 6825ce6c64..fe77d67311 100644
--- a/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs
@@ -1,4 +1,4 @@
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using System.Windows.Input;
using NETworkManager.Models.IPApi;
using NETworkManager.Settings;
@@ -91,7 +91,7 @@ private void CheckViaHotkeyAction()
///
public void Check()
{
- CheckAsync().ConfigureAwait(false);
+ _ = CheckAsync();
}
///
diff --git a/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs b/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs
index ebc11887e6..5074cc6968 100644
--- a/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs
@@ -1,4 +1,4 @@
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using System.Windows.Input;
using log4net;
using NETworkManager.Models.IPApi;
@@ -93,7 +93,7 @@ private void CheckViaHotkeyAction()
///
public void Check()
{
- CheckAsync().ConfigureAwait(false);
+ _ = CheckAsync();
}
///
diff --git a/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs b/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
index 6d7daf14da..6fb584ed15 100644
--- a/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPGeolocationHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -377,9 +377,8 @@ private void QueryProfileAction()
///
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPGeolocation)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPGeolocation);
}
///
@@ -400,8 +399,7 @@ private bool ModifyProfile_CanExecute(object obj)
///
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -414,8 +412,7 @@ private void EditProfileAction()
///
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -428,9 +425,8 @@ private void CopyAsProfileAction()
///
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -443,9 +439,8 @@ private void DeleteProfileAction()
///
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/IPGeolocationViewModel.cs b/Source/NETworkManager/ViewModels/IPGeolocationViewModel.cs
index 705570e9e2..40b009ee88 100644
--- a/Source/NETworkManager/ViewModels/IPGeolocationViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPGeolocationViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -163,7 +163,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Host))
- Query().ConfigureAwait(false);
+ _ = Query();
_firstLoad = false;
}
@@ -201,7 +201,7 @@ private bool Query_CanExecute(object parameter)
///
private void QueryAction()
{
- Query().ConfigureAwait(false);
+ _ = Query();
}
///
@@ -214,7 +214,7 @@ private void QueryAction()
///
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
index 3444db523e..951dc01100 100644
--- a/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -377,9 +377,8 @@ private void ScanProfileAction()
///
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPScanner)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.IPScanner);
}
///
@@ -400,8 +399,7 @@ private bool ModifyProfile_CanExecute(object obj)
///
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -414,8 +412,7 @@ private void EditProfileAction()
///
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -428,9 +425,8 @@ private void CopyAsProfileAction()
///
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -443,9 +439,8 @@ private void DeleteProfileAction()
///
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
index e818697b03..b41389cd73 100644
--- a/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Settings;
using NETworkManager.Utilities;
@@ -371,7 +371,7 @@ private void EditCustomCommandAction()
///
private void DeleteCustomCommandAction()
{
- DeleteCustomCommand().ConfigureAwait(false);
+ _ = DeleteCustomCommand();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/IPScannerViewModel.cs b/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
index 3d4ee80327..f42fb9b2e1 100644
--- a/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
+++ b/Source/NETworkManager/ViewModels/IPScannerViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -287,7 +287,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Host))
- Start().ConfigureAwait(false);
+ _ = Start();
_firstLoad = false;
}
@@ -313,7 +313,7 @@ private void ScanAction()
if (IsRunning)
Stop();
else
- Start().ConfigureAwait(false);
+ _ = Start();
}
///
@@ -323,7 +323,7 @@ private void ScanAction()
private void DetectSubnetAction()
{
- DetectSubnet().ConfigureAwait(false);
+ _ = DetectSubnet();
}
///
@@ -370,7 +370,7 @@ private void PerformDNSLookupHostnameAction()
private void CustomCommandAction(object guid)
{
- CustomCommand(guid).ConfigureAwait(false);
+ _ = CustomCommand(guid);
}
///
@@ -420,7 +420,7 @@ private void CopySelectedPortsAction()
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/ListenersViewModel.cs b/Source/NETworkManager/ViewModels/ListenersViewModel.cs
index e9274c9492..5658ee8c52 100644
--- a/Source/NETworkManager/ViewModels/ListenersViewModel.cs
+++ b/Source/NETworkManager/ViewModels/ListenersViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -56,7 +56,7 @@ public ListenersViewModel()
};
// Get listeners
- Refresh(true).ConfigureAwait(false);
+ _ = Refresh(true);
// Auto refresh
_autoRefreshTimer.Tick += AutoRefreshTimer_Tick;
@@ -294,7 +294,7 @@ public string StatusMessage
///
/// Gets the command to refresh the listeners.
///
- public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
+ public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);
///
/// Checks if the refresh command can be executed.
@@ -323,7 +323,7 @@ private async Task RefreshAction()
///
/// Gets the command to export the listeners.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the listeners.
diff --git a/Source/NETworkManager/ViewModels/LookupOUILookupViewModel.cs b/Source/NETworkManager/ViewModels/LookupOUILookupViewModel.cs
index 723ffb205e..fdd320882b 100644
--- a/Source/NETworkManager/ViewModels/LookupOUILookupViewModel.cs
+++ b/Source/NETworkManager/ViewModels/LookupOUILookupViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -268,7 +268,7 @@ private async void OUILookupAction()
///
/// Gets the command to export the results.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Exports the results.
diff --git a/Source/NETworkManager/ViewModels/LookupPortViewModel.cs b/Source/NETworkManager/ViewModels/LookupPortViewModel.cs
index a32f4a999d..62e6aea1e6 100644
--- a/Source/NETworkManager/ViewModels/LookupPortViewModel.cs
+++ b/Source/NETworkManager/ViewModels/LookupPortViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -199,7 +199,7 @@ public bool NothingFound
/// Gets the command to perform the port lookup.
///
public ICommand PortLookupCommand =>
- new RelayCommand(_ => PortLookupAction().ConfigureAwait(false), PortLookup_CanExecute);
+ new RelayCommand(parameter => { _ = PortLookupAction(); }, PortLookup_CanExecute);
///
/// Checks if the port lookup command can be executed.
@@ -328,7 +328,7 @@ await PortLookup.LookupByPortAndProtocolAsync(
///
/// Gets the command to export the results.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Exports the results.
diff --git a/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs b/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs
index 48bdbe7371..905d09ae13 100644
--- a/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs
+++ b/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -62,7 +62,7 @@ public NeighborTableViewModel()
};
// Get neighbor table
- Refresh(true).ConfigureAwait(false);
+ _ = Refresh(true);
// Auto refresh
_autoRefreshTimer.Tick += AutoRefreshTimer_Tick;
@@ -255,7 +255,7 @@ private set
#region ICommands & Actions
- public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
+ public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);
private bool Refresh_CanExecute(object parameter)
{
@@ -275,7 +275,7 @@ private async Task RefreshAction()
}
public ICommand DeleteTableCommand =>
- new RelayCommand(_ => DeleteTableAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = DeleteTableAction(); }, ModifyEntry_CanExecute);
private async Task DeleteTableAction()
{
@@ -300,7 +300,7 @@ private async Task DeleteTableAction()
}
public ICommand DeleteEntryCommand =>
- new RelayCommand(_ => DeleteEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = DeleteEntryAction(); }, ModifyEntry_CanExecute);
private async Task DeleteEntryAction()
{
@@ -325,7 +325,7 @@ private async Task DeleteEntryAction()
}
public ICommand AddEntryCommand =>
- new RelayCommand(_ => AddEntryAction().ConfigureAwait(false), ModifyEntry_CanExecute);
+ new RelayCommand(parameter => { _ = AddEntryAction(); }, ModifyEntry_CanExecute);
private async Task AddEntryAction()
{
@@ -383,7 +383,7 @@ private bool ModifyEntry_CanExecute(object parameter)
!IsModifying;
}
- public ICommand RestartAsAdminCommand => new RelayCommand(_ => RestartAsAdminAction().ConfigureAwait(false));
+ public ICommand RestartAsAdminCommand => new RelayCommand(parameter => { _ = RestartAsAdminAction(); });
private async Task RestartAsAdminAction()
{
@@ -398,7 +398,7 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro
}
}
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
private Task ExportAction()
{
diff --git a/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs b/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs
index 3bcc80d2ab..ff121d3691 100644
--- a/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs
+++ b/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs
@@ -1,4 +1,4 @@
-using NETworkManager.Models.Network;
+using NETworkManager.Models.Network;
using NETworkManager.Settings;
using NETworkManager.Utilities;
using System;
@@ -521,7 +521,7 @@ private void CheckViaHotkeyAction()
///
public void Check()
{
- CheckAsync().ConfigureAwait(false);
+ _ = CheckAsync();
}
///
diff --git a/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs b/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
index cd16c741fd..1c265f963e 100644
--- a/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
+++ b/Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
@@ -1,4 +1,4 @@
-using LiveCharts;
+using LiveCharts;
using LiveCharts.Configurations;
using LiveCharts.Wpf;
using log4net;
@@ -694,7 +694,7 @@ public NetworkInterfaceViewModel()
{
_isLoading = true;
- LoadNetworkInterfaces().ConfigureAwait(false);
+ _ = LoadNetworkInterfaces();
InitialBandwidthChart();
@@ -823,7 +823,7 @@ private void ReloadNetworkInterfacesAction()
///
/// Gets the command to export the network interfaces.
///
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
///
/// Action to export the network interfaces.
@@ -893,7 +893,7 @@ private bool ApplyConfiguration_CanExecute(object parameter)
///
private void ApplyConfigurationAction()
{
- ApplyConfiguration().ConfigureAwait(false);
+ _ = ApplyConfiguration();
}
///
@@ -903,7 +903,7 @@ private void ApplyConfigurationAction()
private void ApplyProfileAction()
{
- ApplyConfigurationFromProfile().ConfigureAwait(false);
+ _ = ApplyConfigurationFromProfile();
}
///
@@ -913,9 +913,8 @@ private void ApplyProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.NetworkInterface)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.NetworkInterface);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -930,8 +929,7 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -941,8 +939,7 @@ private void EditProfileAction()
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -952,9 +949,8 @@ private void CopyAsProfileAction()
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -964,9 +960,8 @@ private void DeleteProfileAction()
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
@@ -1048,7 +1043,7 @@ private bool AdditionalCommands_CanExecute(object parameter)
private void OpenNetworkConnectionsAction()
{
- OpenNetworkConnectionsAsync().ConfigureAwait(false);
+ _ = OpenNetworkConnectionsAsync();
}
///
@@ -1075,7 +1070,7 @@ private void IPScannerAction()
private void FlushDNSAction()
{
- FlushDNSAsync().ConfigureAwait(false);
+ _ = FlushDNSAsync();
}
///
@@ -1085,7 +1080,7 @@ private void FlushDNSAction()
private void ReleaseRenewAction()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.ReleaseRenew).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.ReleaseRenew);
}
///
@@ -1095,7 +1090,7 @@ private void ReleaseRenewAction()
private void ReleaseAction()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.Release).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.Release);
}
///
@@ -1105,7 +1100,7 @@ private void ReleaseAction()
private void RenewAction()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.Renew).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.Renew6);
}
///
@@ -1115,7 +1110,7 @@ private void RenewAction()
private void ReleaseRenew6Action()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.ReleaseRenew6).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.ReleaseRenew6);
}
///
@@ -1125,7 +1120,7 @@ private void ReleaseRenew6Action()
private void Release6Action()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.Release6).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.Release6);
}
///
@@ -1135,13 +1130,13 @@ private void Release6Action()
private void Renew6Action()
{
- ReleaseRenewAsync(IPConfigReleaseRenewMode.Renew).ConfigureAwait(false);
+ _ = ReleaseRenewAsync(IPConfigReleaseRenewMode.Renew);
}
///
/// Gets the command to add an IPv4 address.
///
- public ICommand AddIPv4AddressCommand => new RelayCommand(_ => AddIPv4AddressAction().ConfigureAwait(false),
+ public ICommand AddIPv4AddressCommand => new RelayCommand(parameter => { _ = AddIPv4AddressAction(); },
AdditionalCommands_CanExecute);
private async Task AddIPv4AddressAction()
@@ -1172,7 +1167,7 @@ private async Task AddIPv4AddressAction()
///
/// Gets the command to remove an IPv4 address.
///
- public ICommand RemoveIPv4AddressCommand => new RelayCommand(_ => RemoveIPv4AddressAction().ConfigureAwait(false),
+ public ICommand RemoveIPv4AddressCommand => new RelayCommand(parameter => { _ = RemoveIPv4AddressAction(); },
AdditionalCommands_CanExecute);
private async Task RemoveIPv4AddressAction()
diff --git a/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs b/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
index 8124da423f..765b293a2b 100644
--- a/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.Controls;
+using MahApps.Metro.Controls;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -432,7 +432,7 @@ private void PingAction()
if (IsRunning)
Stop();
else
- Start().ConfigureAwait(false);
+ _ = Start();
}
///
@@ -448,7 +448,7 @@ private bool PingProfile_CanExecute(object obj)
private void PingProfileAction()
{
if (SetHost(SelectedProfile.PingMonitor_Host, SelectedProfile.Group))
- Start().ConfigureAwait(false);
+ _ = Start();
}
///
@@ -478,9 +478,8 @@ private void ExportAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PingMonitor)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PingMonitor);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -495,8 +494,7 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -506,8 +504,7 @@ private void EditProfileAction()
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -517,9 +514,8 @@ private void CopyAsProfileAction()
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -529,9 +525,8 @@ private void DeleteProfileAction()
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs b/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
index dc82c23e23..288c74a915 100644
--- a/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -362,9 +362,8 @@ private void ScanProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PortScanner)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PortScanner);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -379,8 +378,7 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -390,8 +388,7 @@ private void EditProfileAction()
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -401,9 +398,8 @@ private void CopyAsProfileAction()
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -413,9 +409,8 @@ private void DeleteProfileAction()
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs b/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
index b85faaed42..42bb4fff47 100644
--- a/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
using NETworkManager.Settings;
@@ -177,21 +177,21 @@ private void LoadSettings()
private void AddPortProfileAction()
{
- AddPortProfile().ConfigureAwait(false);
+ _ = AddPortProfile();
}
public ICommand EditPortProfileCommand => new RelayCommand(_ => EditPortProfileAction());
private void EditPortProfileAction()
{
- EditPortProfile().ConfigureAwait(false);
+ _ = EditPortProfile();
}
public ICommand DeletePortProfileCommand => new RelayCommand(_ => DeletePortProfileAction());
private void DeletePortProfileAction()
{
- DeletePortProfile().ConfigureAwait(false);
+ _ = DeletePortProfile();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/PortScannerViewModel.cs b/Source/NETworkManager/ViewModels/PortScannerViewModel.cs
index 81aceb5232..c4d0b75534 100644
--- a/Source/NETworkManager/ViewModels/PortScannerViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PortScannerViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -284,7 +284,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Host) && !string.IsNullOrEmpty(Ports))
- Start().ConfigureAwait(false);
+ _ = Start();
_firstLoad = false;
}
@@ -320,7 +320,7 @@ private bool OpenPortProfileSelection_CanExecute(object parameter)
private void OpenPortProfileSelectionAction()
{
- OpenPortProfileSelection().ConfigureAwait(false);
+ _ = OpenPortProfileSelection();
}
public ICommand ScanCommand => new RelayCommand(_ => ScanAction(), Scan_CanExecute);
@@ -337,14 +337,14 @@ private void ScanAction()
if (IsRunning)
Stop();
else
- Start().ConfigureAwait(false);
+ _ = Start();
}
public ICommand ExportCommand => new RelayCommand(_ => ExportAction());
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs b/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
index f64d16b8e7..4ac3744aae 100644
--- a/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using log4net;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -344,7 +344,7 @@ private bool Connect_CanExecute(object obj)
private void ConnectAction()
{
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
private bool IsConnected_CanExecute(object view)
@@ -397,9 +397,8 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PowerShell)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PowerShell);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -411,31 +410,29 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager.ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand TextBoxSearchGotFocusCommand
@@ -704,7 +701,7 @@ private void Connect(PowerShellSessionInfo sessionInfo, string header = null)
public void AddTab(string host)
{
- Connect(host).ConfigureAwait(false);
+ _ = Connect(host);
}
// Modify history list
diff --git a/Source/NETworkManager/ViewModels/PowerShellSettingsViewModel.cs b/Source/NETworkManager/ViewModels/PowerShellSettingsViewModel.cs
index b9fd4fbe33..90f20e452a 100644
--- a/Source/NETworkManager/ViewModels/PowerShellSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PowerShellSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -161,7 +161,7 @@ private void BrowseFileAction()
private void ConfigureAction()
{
- Configure().ConfigureAwait(false);
+ _ = Configure();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
index 341e5a332a..9bfd752aba 100644
--- a/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
+++ b/Source/NETworkManager/ViewModels/ProfilesViewModel.cs
@@ -1,4 +1,4 @@
-using NETworkManager.Profiles;
+using NETworkManager.Profiles;
using NETworkManager.Settings;
using NETworkManager.Utilities;
using System;
@@ -234,29 +234,28 @@ public bool IsProfileFilterSet
private void AddGroupAction()
{
- ProfileDialogManager.ShowAddGroupDialog(Application.Current.MainWindow, this).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowAddGroupDialog(Application.Current.MainWindow, this);
}
public ICommand EditGroupCommand => new RelayCommand(_ => EditGroupAction());
private void EditGroupAction()
{
- ProfileDialogManager.ShowEditGroupDialog(Application.Current.MainWindow, this, SelectedGroup).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditGroupDialog(Application.Current.MainWindow, this, SelectedGroup);
}
public ICommand DeleteGroupCommand => new RelayCommand(_ => DeleteGroupAction());
private void DeleteGroupAction()
{
- ProfileDialogManager.ShowDeleteGroupDialog(Application.Current.MainWindow, this, SelectedGroup).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowDeleteGroupDialog(Application.Current.MainWindow, this, SelectedGroup);
}
public ICommand AddProfileCommand => new RelayCommand(_ => AddProfileAction());
private void AddProfileAction()
{
- ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, SelectedGroup?.Name)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowAddProfileDialog(Application.Current.MainWindow, this, null, SelectedGroup?.Name);
}
public ICommand EditProfileCommand => new RelayCommand(_ => EditProfileAction(), EditProfile_CanExecute);
@@ -268,7 +267,7 @@ private bool EditProfile_CanExecute(object parameter)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -280,25 +279,23 @@ private bool ModifyProfile_CanExecute(object obj)
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile).ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, [.. SelectedProfiles.Cast()])
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, [.. SelectedProfiles.Cast()]);
}
public ICommand ImportProfilesCommand => new RelayCommand(_ => ImportProfilesAction());
private void ImportProfilesAction()
{
- ProfileDialogManager
- .ShowImportProfilesDialog(Application.Current.MainWindow, this, SelectedGroup?.Name)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowImportProfilesDialog(Application.Current.MainWindow, this, SelectedGroup?.Name);
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
diff --git a/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs b/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
index 4033404c05..7745f8c34f 100644
--- a/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using log4net;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -349,7 +349,7 @@ private bool Connect_CanExecute(object obj)
private void ConnectAction()
{
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
private bool IsConnected_CanExecute(object view)
@@ -410,9 +410,8 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PuTTY)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.PuTTY);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -424,34 +423,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand TextBoxSearchGotFocusCommand
@@ -650,7 +645,7 @@ private void Connect(PuTTYSessionInfo sessionInfo, string header = null)
public void AddTab(string host)
{
- Connect(host).ConfigureAwait(false);
+ _ = Connect(host);
}
// Modify history list
diff --git a/Source/NETworkManager/ViewModels/PuTTYSettingsViewModel.cs b/Source/NETworkManager/ViewModels/PuTTYSettingsViewModel.cs
index d41476d2e5..1e8a387099 100644
--- a/Source/NETworkManager/ViewModels/PuTTYSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/PuTTYSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -418,7 +418,7 @@ private void ApplicationBrowseFileAction()
private void ConfigureAction()
{
- Configure().ConfigureAwait(false);
+ _ = Configure();
}
public ICommand PrivateKeyFileBrowseFileCommand => new RelayCommand(_ => PrivateKeyFileBrowseFileAction());
diff --git a/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs b/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
index 1dbd6b234b..aeadde6120 100644
--- a/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
@@ -280,7 +280,7 @@ private void LoadSettings()
private void ConnectAction()
{
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
private bool IsConnected_CanExecute(object view)
@@ -371,7 +371,7 @@ private void ConnectProfileAction()
private void ConnectProfileAsAction()
{
- ConnectProfileAs().ConfigureAwait(false);
+ _ = ConnectProfileAs();
}
public ICommand ConnectProfileExternalCommand => new RelayCommand(_ => ConnectProfileExternalAction());
@@ -392,9 +392,8 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.RemoteDesktop)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.RemoteDesktop);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -406,34 +405,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
@@ -633,7 +628,7 @@ private void Connect(RemoteDesktopSessionInfo sessionInfo, string header = null)
public void AddTab(string host)
{
- Connect(host).ConfigureAwait(false);
+ _ = Connect(host);
}
// Modify history list
diff --git a/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs b/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
index 6b2f99f62c..937cdaba16 100644
--- a/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNMPHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -297,9 +297,8 @@ private void AddTabProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.SNMP)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.SNMP);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -311,34 +310,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
diff --git a/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs b/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
index 14d5981561..99a12e45d0 100644
--- a/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNMPSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using Lextm.SharpSnmpLib.Messaging;
+using Lextm.SharpSnmpLib.Messaging;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
@@ -122,21 +122,21 @@ private void LoadSettings()
private void AddOIDProfileAction()
{
- AddOIDProfile().ConfigureAwait(false);
+ _ = AddOIDProfile();
}
public ICommand EditOIDProfileCommand => new RelayCommand(_ => EditOIDProfileAction());
private void EditOIDProfileAction()
{
- EditOIDProfile().ConfigureAwait(false);
+ _ = EditOIDProfile();
}
public ICommand DeleteOIDProfileCommand => new RelayCommand(_ => DeleteOIDProfileAction());
private void DeleteOIDProfileAction()
{
- DeleteOIDProfile().ConfigureAwait(false);
+ _ = DeleteOIDProfile();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SNMPViewModel.cs b/Source/NETworkManager/ViewModels/SNMPViewModel.cs
index de8ef5771e..dd2cf330fb 100644
--- a/Source/NETworkManager/ViewModels/SNMPViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNMPViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -453,14 +453,14 @@ private void WorkAction()
private void OpenOIDProfilesAction()
{
- OpenOIDProfileSelection().ConfigureAwait(false);
+ _ = OpenOIDProfileSelection();
}
public ICommand ExportCommand => new RelayCommand(_ => ExportAction());
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs b/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
index 8793a737a5..6d3eb7ec37 100644
--- a/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNTPLookupSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
using NETworkManager.Settings;
@@ -100,14 +100,14 @@ private void LoadSettings()
private void AddServerAction()
{
- AddServer().ConfigureAwait(false);
+ _ = AddServer();
}
public ICommand EditServerCommand => new RelayCommand(_ => EditServerAction());
private void EditServerAction()
{
- EditServer().ConfigureAwait(false);
+ _ = EditServer();
}
public ICommand DeleteServerCommand => new RelayCommand(_ => DeleteServerAction(), DeleteServer_CanExecute);
@@ -119,7 +119,7 @@ private bool DeleteServer_CanExecute(object obj)
private void DeleteServerAction()
{
- DeleteServer().ConfigureAwait(false);
+ _ = DeleteServer();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SNTPLookupViewModel.cs b/Source/NETworkManager/ViewModels/SNTPLookupViewModel.cs
index 112a2de278..ce64260c65 100644
--- a/Source/NETworkManager/ViewModels/SNTPLookupViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SNTPLookupViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -184,7 +184,7 @@ private void QueryAction()
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs b/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
index 9a62217d2e..2905a17def 100644
--- a/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Profiles;
using NETworkManager.Settings;
@@ -222,7 +222,7 @@ private static void OpenLocationAction()
///
/// Gets the command that initiates the action to change the location.
///
- public ICommand ChangeLocationCommand => new RelayCommand(_ => ChangeLocationAction().ConfigureAwait(false));
+ public ICommand ChangeLocationCommand => new RelayCommand(parameter => { _ = ChangeLocationAction(); });
///
/// Prompts the user to confirm and then changes the location of the profiles folder.
@@ -253,7 +253,7 @@ private async Task ChangeLocationAction()
///
/// Gets the command that restores the default location.
///
- public ICommand RestoreDefaultLocationCommand => new RelayCommand(_ => RestoreDefaultLocationActionAsync().ConfigureAwait(false));
+ public ICommand RestoreDefaultLocationCommand => new RelayCommand(parameter => { _ = RestoreDefaultLocationActionAsync(); });
///
/// Restores the profiles folder location to the default path after obtaining user confirmation.
diff --git a/Source/NETworkManager/ViewModels/SettingsSettingsViewModel.cs b/Source/NETworkManager/ViewModels/SettingsSettingsViewModel.cs
index 4b3e4005d9..13c0e08010 100644
--- a/Source/NETworkManager/ViewModels/SettingsSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SettingsSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using NETworkManager.Localization.Resources;
+using NETworkManager.Localization.Resources;
using NETworkManager.Settings;
using NETworkManager.Utilities;
using System;
@@ -186,7 +186,7 @@ private static void OpenLocationAction()
///
/// Gets the command that initiates the action to change the location.
///
- public ICommand ChangeLocationCommand => new RelayCommand(_ => ChangeLocationAction().ConfigureAwait(false));
+ public ICommand ChangeLocationCommand => new RelayCommand(parameter => { _ = ChangeLocationAction(); });
///
/// Prompts the user to confirm and then changes the location of the settings folder.
@@ -218,7 +218,7 @@ private async Task ChangeLocationAction()
///
/// Gets the command that restores the default location settings asynchronously.
///
- public ICommand RestoreDefaultLocationCommand => new RelayCommand(_ => RestoreDefaultLocationActionAsync().ConfigureAwait(false));
+ public ICommand RestoreDefaultLocationCommand => new RelayCommand(parameter => { _ = RestoreDefaultLocationActionAsync(); });
///
/// Restores the application's settings folder location to the default path after obtaining user confirmation.
@@ -254,7 +254,7 @@ private async Task RestoreDefaultLocationActionAsync()
///
/// Gets the command that resets the application settings to their default values.
///
- public ICommand ResetSettingsCommand => new RelayCommand(_ => ResetSettingsAction().ConfigureAwait(false));
+ public ICommand ResetSettingsCommand => new RelayCommand(parameter => { _ = ResetSettingsAction(); });
///
/// Resets the application settings to their default values.
diff --git a/Source/NETworkManager/ViewModels/SubnetCalculatorSubnettingViewModel.cs b/Source/NETworkManager/ViewModels/SubnetCalculatorSubnettingViewModel.cs
index 37d30d2bb0..45dcc67af1 100644
--- a/Source/NETworkManager/ViewModels/SubnetCalculatorSubnettingViewModel.cs
+++ b/Source/NETworkManager/ViewModels/SubnetCalculatorSubnettingViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
@@ -159,10 +159,10 @@ private bool Calculate_CanExecute(object parameter)
private void CalculateAction()
{
- Calculate().ConfigureAwait(false);
+ _ = Calculate();
}
- public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
+ public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });
private Task ExportAction()
{
diff --git a/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs b/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
index 6ef20d2a0c..ca7ab8aa64 100644
--- a/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
@@ -310,7 +310,7 @@ private bool Connect_CanExecute(object obj)
private void ConnectAction()
{
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
public ICommand ReconnectCommand => new RelayCommand(ReconnectAction);
@@ -347,9 +347,8 @@ private void ConnectProfileExternalAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.TigerVNC)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.TigerVNC);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -361,34 +360,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
@@ -530,7 +525,7 @@ private void Connect(TigerVNCSessionInfo sessionInfo, string header = null)
public void AddTab(string host)
{
- Connect(host).ConfigureAwait(false);
+ _ = Connect(host);
}
// Modify history list
diff --git a/Source/NETworkManager/ViewModels/TigerVNCSettingsViewModel.cs b/Source/NETworkManager/ViewModels/TigerVNCSettingsViewModel.cs
index be33302629..a63bc81e6d 100644
--- a/Source/NETworkManager/ViewModels/TigerVNCSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TigerVNCSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
@@ -104,7 +104,7 @@ private void BrowseFileAction()
private void ConfigureAction()
{
- Configure().ConfigureAwait(false);
+ _ = Configure();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs b/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
index c2310214ba..68c0b70b73 100644
--- a/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TracerouteHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -299,9 +299,8 @@ private void TraceProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Traceroute)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Traceroute);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -313,34 +312,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
diff --git a/Source/NETworkManager/ViewModels/TracerouteViewModel.cs b/Source/NETworkManager/ViewModels/TracerouteViewModel.cs
index e4a8857b0c..4565094251 100644
--- a/Source/NETworkManager/ViewModels/TracerouteViewModel.cs
+++ b/Source/NETworkManager/ViewModels/TracerouteViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -214,7 +214,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Host))
- StartTrace().ConfigureAwait(false);
+ _ = StartTrace();
_firstLoad = false;
}
@@ -244,7 +244,7 @@ private void TraceAction()
if (IsRunning)
StopTrace();
else
- StartTrace().ConfigureAwait(false);
+ _ = StartTrace();
}
///
@@ -299,7 +299,7 @@ private void CopyTimeToClipboardAction(object timeIdentifier)
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs b/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
index c880d5a60b..c74e0c7bf9 100644
--- a/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.Controls;
+using MahApps.Metro.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
using NETworkManager.Models.Network;
@@ -386,7 +386,7 @@ private void WakeUpAction()
AddMACAddressToHistory(MACAddress);
AddBroadcastToHistory(Broadcast);
- WakeUp(info).ConfigureAwait(false);
+ _ = WakeUp(info);
}
///
@@ -396,7 +396,7 @@ private void WakeUpAction()
private void WakeUpProfileAction()
{
- WakeUp(NETworkManager.Profiles.Application.WakeOnLAN.CreateInfo(SelectedProfile)).ConfigureAwait(false);
+ _ = WakeUp(NETworkManager.Profiles.Application.WakeOnLAN.CreateInfo(SelectedProfile));
}
///
@@ -406,9 +406,8 @@ private void WakeUpProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WakeOnLAN)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WakeOnLAN);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -423,8 +422,7 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -434,8 +432,7 @@ private void EditProfileAction()
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
///
@@ -445,9 +442,8 @@ private void CopyAsProfileAction()
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
///
@@ -457,9 +453,8 @@ private void DeleteProfileAction()
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
///
diff --git a/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs b/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
index 118b9cdcf4..b79ba110a4 100644
--- a/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using MahApps.Metro.SimpleChildWindow;
using Microsoft.Web.WebView2.Core;
using NETworkManager.Controls;
@@ -314,7 +314,7 @@ private void CloseItemAction(ItemActionCallbackArgs args)
private void ConnectAction()
{
- Connect().ConfigureAwait(false);
+ _ = Connect();
}
public ICommand ReloadCommand => new RelayCommand(ReloadAction);
@@ -342,9 +342,8 @@ private void ConnectProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WebConsole)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.WebConsole);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -356,34 +355,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
diff --git a/Source/NETworkManager/ViewModels/WebConsoleSettingsViewModel.cs b/Source/NETworkManager/ViewModels/WebConsoleSettingsViewModel.cs
index 7e868a7c96..f017858cd7 100644
--- a/Source/NETworkManager/ViewModels/WebConsoleSettingsViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WebConsoleSettingsViewModel.cs
@@ -1,4 +1,4 @@
-using MahApps.Metro.SimpleChildWindow;
+using MahApps.Metro.SimpleChildWindow;
using Microsoft.Web.WebView2.Core;
using NETworkManager.Localization.Resources;
using NETworkManager.Settings;
@@ -93,7 +93,7 @@ private void LoadSettings()
private void DeleteBrowsingDataAction()
{
- DeleteBrowsingData().ConfigureAwait(false);
+ _ = DeleteBrowsingData();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs b/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
index f95787bfb1..b4666609c3 100644
--- a/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WhoisHostViewModel.cs
@@ -1,4 +1,4 @@
-using Dragablz;
+using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
@@ -299,9 +299,8 @@ private void QueryProfileAction()
private void AddProfileAction()
{
- ProfileDialogManager
- .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Whois)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.Whois);
}
private bool ModifyProfile_CanExecute(object obj)
@@ -313,34 +312,30 @@ private bool ModifyProfile_CanExecute(object obj)
private void EditProfileAction()
{
- ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand CopyAsProfileCommand => new RelayCommand(_ => CopyAsProfileAction(), ModifyProfile_CanExecute);
private void CopyAsProfileAction()
{
- ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
- .ConfigureAwait(false);
+ _ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}
public ICommand DeleteProfileCommand => new RelayCommand(_ => DeleteProfileAction(), ModifyProfile_CanExecute);
private void DeleteProfileAction()
{
- ProfileDialogManager
- .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile })
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List { SelectedProfile });
}
public ICommand EditGroupCommand => new RelayCommand(EditGroupAction);
private void EditGroupAction(object group)
{
- ProfileDialogManager
- .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
- .ConfigureAwait(false);
+ _ = ProfileDialogManager
+ .ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}
public ICommand OpenProfileFilterCommand => new RelayCommand(_ => OpenProfileFilterAction());
diff --git a/Source/NETworkManager/ViewModels/WhoisViewModel.cs b/Source/NETworkManager/ViewModels/WhoisViewModel.cs
index f324f124bf..c272c874ca 100644
--- a/Source/NETworkManager/ViewModels/WhoisViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WhoisViewModel.cs
@@ -1,4 +1,4 @@
-using log4net;
+using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
@@ -130,7 +130,7 @@ public void OnLoaded()
return;
if (!string.IsNullOrEmpty(Domain))
- Query().ConfigureAwait(false);
+ _ = Query();
_firstLoad = false;
}
@@ -154,14 +154,14 @@ private bool Query_CanExecute(object parameter)
private void QueryAction()
{
- Query().ConfigureAwait(false);
+ _ = Query();
}
public ICommand ExportCommand => new RelayCommand(_ => ExportAction());
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
#endregion
diff --git a/Source/NETworkManager/ViewModels/WiFiViewModel.cs b/Source/NETworkManager/ViewModels/WiFiViewModel.cs
index 2b2a1bb892..254601c740 100644
--- a/Source/NETworkManager/ViewModels/WiFiViewModel.cs
+++ b/Source/NETworkManager/ViewModels/WiFiViewModel.cs
@@ -1,4 +1,4 @@
-using LiveCharts;
+using LiveCharts;
using LiveCharts.Wpf;
using log4net;
using MahApps.Metro.SimpleChildWindow;
@@ -101,7 +101,7 @@ public WiFiAdapterInfo SelectedAdapter
if (!_isLoading)
SettingsManager.Current.WiFi_InterfaceId = value.NetworkInterfaceInfo.Id;
- ScanAsync(value).ConfigureAwait(false);
+ _ = ScanAsync(value);
}
field = value;
@@ -451,7 +451,7 @@ public WiFiViewModel()
};
// Load network adapters
- LoadAdaptersAsync(SettingsManager.Current.WiFi_InterfaceId).ConfigureAwait(false);
+ _ = LoadAdaptersAsync(SettingsManager.Current.WiFi_InterfaceId);
// Auto refresh
_autoRefreshTimer.Tick += AutoRefreshTimer_Tick;
@@ -492,11 +492,11 @@ private bool ReloadAdapter_CanExecute(object obj)
private void ReloadAdapterAction()
{
- LoadAdaptersAsync(SelectedAdapter?.NetworkInterfaceInfo.Id).ConfigureAwait(false);
+ _ = LoadAdaptersAsync(SelectedAdapter?.NetworkInterfaceInfo.Id);
}
public ICommand ScanNetworksCommand =>
- new RelayCommand(_ => ScanNetworksAction().ConfigureAwait(false), ScanNetworks_CanExecute);
+ new RelayCommand(parameter => { _ = ScanNetworksAction(); }, ScanNetworks_CanExecute);
private bool ScanNetworks_CanExecute(object obj)
{
@@ -526,7 +526,7 @@ private void DisconnectAction()
private void ExportAction()
{
- Export().ConfigureAwait(false);
+ _ = Export();
}
public ICommand OpenSettingsCommand => new RelayCommand(_ => OpenSettingsAction());
diff --git a/Source/NETworkManager/Views/PingMonitorHostView.xaml.cs b/Source/NETworkManager/Views/PingMonitorHostView.xaml.cs
index 580c829800..9d89c54450 100644
--- a/Source/NETworkManager/Views/PingMonitorHostView.xaml.cs
+++ b/Source/NETworkManager/Views/PingMonitorHostView.xaml.cs
@@ -30,7 +30,7 @@ private void ListBoxItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
public void AddHost(string host)
{
if (_viewModel.SetHost(host))
- _viewModel.Start().ConfigureAwait(false);
+ _ = _viewModel.Start();
}
public void OnViewHide()
diff --git a/Source/NETworkManager/Views/PingMonitorView.xaml.cs b/Source/NETworkManager/Views/PingMonitorView.xaml.cs
index 00c05b4046..97e6720162 100644
--- a/Source/NETworkManager/Views/PingMonitorView.xaml.cs
+++ b/Source/NETworkManager/Views/PingMonitorView.xaml.cs
@@ -36,7 +36,7 @@ public void Stop()
public void Export()
{
- _viewModel.Export().ConfigureAwait(false);
+ _ = _viewModel.Export();
}
private void Dispatcher_ShutdownStarted(object sender, EventArgs e)
diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md
index 0ae974e596..480ee60f48 100644
--- a/Website/docs/changelog/next-release.md
+++ b/Website/docs/changelog/next-release.md
@@ -100,12 +100,17 @@ Release date: **xx.xx.2025**
- Fixed incorrect initial embedded window size on high-DPI monitors. The `WindowsFormsHost` panel now sets its initial dimensions in physical pixels using the current DPI scale factor, ensuring the PuTTY window fills the panel correctly at startup. [#3352](https://github.com/BornToBeRoot/NETworkManager/pull/3352)
+**Network Interface**
+
+- Fixed `Renew6Action` incorrectly calling `ipconfig /renew` (IPv4) instead of `ipconfig /renew6` (IPv6) when renewing the IPv6 address. [#3441](https://github.com/BornToBeRoot/NETworkManager/pull/3441)
+
**TigerVNC**
- Fixed incorrect initial embedded window size on high-DPI monitors. The `WindowsFormsHost` panel now sets its initial dimensions in physical pixels using the current DPI scale factor, ensuring the TigerVNC window fills the panel correctly at startup. [#3352](https://github.com/BornToBeRoot/NETworkManager/pull/3352)
## Dependencies, Refactoring & Documentation
+- Replace fire-and-forget `.ConfigureAwait(false)` calls with explicit discard assignments (`_ = SomeAsyncOperation()`) across command handlers, startup/load paths and profile callbacks. [#3441](https://github.com/BornToBeRoot/NETworkManager/pull/3441)
- Code cleanup & refactoring
- Language files updated via [#transifex](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Ftransifex-integration)
- Dependencies updated via [#dependabot](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Fdependabot)