SonarQube async method return type set to Task

This commit is contained in:
BONNEVILLE Geoffroy
2018-06-20 17:20:15 +02:00
parent 188233cc81
commit ca377a6684
8 changed files with 22 additions and 20 deletions

View File

@@ -1,11 +1,12 @@
using System;
using System.Threading.Tasks;
using Windows.UI.Popups;
namespace ModernKeePass.Common
{
public static class MessageDialogHelper
{
public static async void ShowActionDialog(string title, string contentText, string actionButtonText, string cancelButtonText, UICommandInvokedHandler actionCommand, UICommandInvokedHandler cancelCommand)
public static async Task ShowActionDialog(string title, string contentText, string actionButtonText, string cancelButtonText, UICommandInvokedHandler actionCommand, UICommandInvokedHandler cancelCommand)
{
// Create the message dialog and set its content
var messageDialog = CreateBasicDialog(title, contentText, cancelButtonText, cancelCommand);
@@ -17,7 +18,7 @@ namespace ModernKeePass.Common
await messageDialog.ShowAsync();
}
public static async void ShowErrorDialog(Exception exception)
public static async Task ShowErrorDialog(Exception exception)
{
if (exception == null) return;
// Create the message dialog and set its content
@@ -27,7 +28,7 @@ namespace ModernKeePass.Common
await messageDialog.ShowAsync();
}
public static async void ShowNotificationDialog(string title, string message)
public static async Task ShowNotificationDialog(string title, string message)
{
var dialog = CreateBasicDialog(title, message, "OK");