From aab8d15a8cef856cb7ebe7e75455c73f34f403f2 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Mon, 27 Jul 2020 11:31:51 +0200 Subject: [PATCH] #34 Switch to C#8 and syntax fixes for AsyncEnumerable --- Discord Media Loader.Application/Classes/Job.cs | 4 ++-- Discord Media Loader.Application/DML.Application.csproj | 2 ++ .../DML.Application.csproj.DotSettings | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Discord Media Loader.Application/DML.Application.csproj.DotSettings diff --git a/Discord Media Loader.Application/Classes/Job.cs b/Discord Media Loader.Application/Classes/Job.cs index 1b5c8d0..ce8aa33 100644 --- a/Discord Media Loader.Application/Classes/Job.cs +++ b/Discord Media Loader.Application/Classes/Job.cs @@ -95,7 +95,7 @@ namespace DML.AppCore.Classes if (isFirst) { //messages = await channel.GetMessagesAsync(limit).ToArray() as SocketMessage[]; - var realMessages = await channel.GetMessagesAsync(limit).ToArray(); + var realMessages = await channel.GetMessagesAsync(limit).ToArrayAsync(); foreach (var realMessageArray in realMessages) { @@ -107,7 +107,7 @@ namespace DML.AppCore.Classes } else { - var realMessages = await channel.GetMessagesAsync(lastId, Direction.Before, limit).ToArray(); + var realMessages = await channel.GetMessagesAsync(lastId, Direction.Before, limit).ToArrayAsync(); foreach (var realMessageArray in realMessages) { diff --git a/Discord Media Loader.Application/DML.Application.csproj b/Discord Media Loader.Application/DML.Application.csproj index 325aa30..b85fb9b 100644 --- a/Discord Media Loader.Application/DML.Application.csproj +++ b/Discord Media Loader.Application/DML.Application.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + 8 pdbonly @@ -29,6 +30,7 @@ TRACE prompt 4 + 8 diff --git a/Discord Media Loader.Application/DML.Application.csproj.DotSettings b/Discord Media Loader.Application/DML.Application.csproj.DotSettings new file mode 100644 index 0000000..b9fd6ee --- /dev/null +++ b/Discord Media Loader.Application/DML.Application.csproj.DotSettings @@ -0,0 +1,2 @@ + + CSharp80 \ No newline at end of file