From 1f754daf1f327b9203d313ab67b76d13b8979480 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Sat, 31 Jul 2021 14:52:39 -0600 Subject: [PATCH] pragma warning disable 4014 --- .../Services/DownloadClient.cs | 28 ++++++++++--------- .../Services/UnpackClient.cs | 14 ++++++---- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/server/RdtClient.Service/Services/DownloadClient.cs b/server/RdtClient.Service/Services/DownloadClient.cs index 383ef85..83a99b1 100644 --- a/server/RdtClient.Service/Services/DownloadClient.cs +++ b/server/RdtClient.Service/Services/DownloadClient.cs @@ -56,20 +56,22 @@ public async Task Start(DbSettings settings) var uri = new Uri(_download.Link); +#pragma warning disable 4014 Task.Run(async delegate - { - switch (settings.DownloadClient) - { - case "Simple": - await DownloadSimple(uri, filePath); - break; - case "MultiPart": - await DownloadMultiPart(filePath, settings); - break; - default: - throw new Exception($"Unknown download client {settings.DownloadClient}"); - } - }); +#pragma warning restore 4014 + { + switch (settings.DownloadClient) + { + case "Simple": + await DownloadSimple(uri, filePath); + break; + case "MultiPart": + await DownloadMultiPart(filePath, settings); + break; + default: + throw new Exception($"Unknown download client {settings.DownloadClient}"); + } + }); } catch (Exception ex) { diff --git a/server/RdtClient.Service/Services/UnpackClient.cs b/server/RdtClient.Service/Services/UnpackClient.cs index 31ca0dc..a79f12d 100644 --- a/server/RdtClient.Service/Services/UnpackClient.cs +++ b/server/RdtClient.Service/Services/UnpackClient.cs @@ -50,13 +50,15 @@ public async Task Start() throw new Exception("Invalid download path"); } +#pragma warning disable 4014 Task.Run(async delegate - { - if (!_cancelled) - { - await Unpack(filePath); - } - }); +#pragma warning restore 4014 + { + if (!_cancelled) + { + await Unpack(filePath); + } + }); } catch (Exception ex) {