Use ValueTask instead of Task where possible

This commit is contained in:
Alexey Golub 2020-07-18 15:57:51 +03:00
parent ac64d9943a
commit ba66b52fa4
16 changed files with 52 additions and 51 deletions

View file

@ -17,7 +17,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Framework
_viewManager = viewManager;
}
public async Task<T> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
public async ValueTask<T> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
{
// Get the view that renders this viewmodel
var view = _viewManager.CreateAndBindViewForModelIfNecessary(dialogScreen);

View file

@ -70,7 +70,7 @@ namespace DiscordChatExporter.Gui.ViewModels
(sender, args) => IsProgressIndeterminate = ProgressManager.IsActive && ProgressManager.Progress.IsEither(0, 1));
}
private async Task HandleAutoUpdateAsync()
private async ValueTask HandleAutoUpdateAsync()
{
try
{