#34 Switch to C#8 and syntax fixes for AsyncEnumerable

This commit is contained in:
Serraniel 2020-07-27 11:31:51 +02:00
parent 80cab1ea44
commit aab8d15a8c
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3
3 changed files with 6 additions and 2 deletions

View file

@ -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)
{

View file

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Discord.Net.Commands, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">

View file

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp80</s:String></wpf:ResourceDictionary>