chore: language level 10 for all projects

This commit is contained in:
goat 2022-02-13 04:49:33 +01:00
parent 9156f85fff
commit 8c66acf950
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
4 changed files with 19 additions and 21 deletions

View file

@ -3,7 +3,7 @@
<AssemblyName>Dalamud.CorePlugin</AssemblyName> <AssemblyName>Dalamud.CorePlugin</AssemblyName>
<TargetFramework>net5.0-windows</TargetFramework> <TargetFramework>net5.0-windows</TargetFramework>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<LangVersion>9.0</LangVersion> <LangVersion>10.0</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

View file

@ -5,7 +5,7 @@
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<Platforms>x64;AnyCPU</Platforms> <Platforms>x64;AnyCPU</Platforms>
<LangVersion>9.0</LangVersion> <LangVersion>10.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Feature"> <PropertyGroup Label="Feature">

View file

@ -4,7 +4,7 @@
<TargetFramework>net5.0-windows</TargetFramework> <TargetFramework>net5.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<Platforms>x64;AnyCPU</Platforms> <Platforms>x64;AnyCPU</Platforms>
<LangVersion>9.0</LangVersion> <LangVersion>10.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Feature"> <PropertyGroup Label="Feature">

View file

@ -7,6 +7,7 @@ using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Dalamud.Game; using Dalamud.Game;
using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal;
using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Internal.Types;
@ -80,21 +81,6 @@ namespace Dalamud.Interface.Internal.Windows
framework.Update += this.FrameworkOnUpdate; framework.Update += this.FrameworkOnUpdate;
} }
private void FrameworkOnUpdate(Framework framework)
{
try
{
if (!this.loadQueue.TryTake(out var loadAction, 0, this.downloadToken.Token))
return;
loadAction.Invoke();
}
catch (Exception ex)
{
Log.Error(ex, "An unhandled exception occurred in image loader framework dispatcher");
}
}
/// <summary> /// <summary>
/// Gets the default plugin icon. /// Gets the default plugin icon.
/// </summary> /// </summary>
@ -231,6 +217,21 @@ namespace Dalamud.Interface.Internal.Windows
return false; return false;
} }
private void FrameworkOnUpdate(Framework framework)
{
try
{
if (!this.loadQueue.TryTake(out var loadAction, 0, this.downloadToken.Token))
return;
loadAction.Invoke();
}
catch (Exception ex)
{
Log.Error(ex, "An unhandled exception occurred in image loader framework dispatcher");
}
}
private async void DownloadTask() private async void DownloadTask()
{ {
while (!this.downloadToken.Token.IsCancellationRequested) while (!this.downloadToken.Token.IsCancellationRequested)
@ -482,12 +483,9 @@ namespace Dalamud.Interface.Internal.Windows
var bytes = await data.Content.ReadAsByteArrayAsync(); var bytes = await data.Content.ReadAsByteArrayAsync();
imageBytes[i] = bytes; imageBytes[i] = bytes;
Log.Verbose($"Plugin image{i + 1} for {manifest.InternalName} downloaded"); Log.Verbose($"Plugin image{i + 1} for {manifest.InternalName} downloaded");
didAny = true; didAny = true;
} }
if (didAny) if (didAny)