–Upgrade to .NET 11
Test / Run tests (push) Successful in 2m45s

This commit is contained in:
lorenz.stechauner committed 2026-11-12 10:58:05 +01:00
1 parent 2406f58a91
commit 9e110a467a
9 files changed
+70 -70

No files matched your search

+11 -11
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFramework>net11.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
@@ -23,21 +23,21 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="bblanchon.PDFium.Win32" Version="157.0.8086" />
<PackageReference Include="bblanchon.PDFium.Win32" Version="159.0.8152" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="itext" Version="9.8.0" />
<PackageReference Include="itext.bouncy-castle-adapter" Version="9.8.0" />
<PackageReference Include="LinqKit" Version="1.4.0" />
<PackageReference Include="MailKit" Version="4.18.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="10.0.12" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.4258.31" />
<PackageReference Include="NJsonSchema" Version="11.6.1" />
<PackageReference Include="LinqKit" Version="1.4.1" />
<PackageReference Include="MailKit" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="11.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.4314.35" />
<PackageReference Include="NJsonSchema" Version="11.6.2" />
<PackageReference Include="ScottPlot.WPF" Version="5.1.59" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.5" />
<PackageReference Include="System.IO.Hashing" Version="10.0.12" />
<PackageReference Include="System.IO.Ports" Version="10.0.12" />
<PackageReference Include="System.Management" Version="10.0.12" />
<PackageReference Include="System.IO.Hashing" Version="11.0.0" />
<PackageReference Include="System.IO.Ports" Version="11.0.0" />
<PackageReference Include="System.Management" Version="11.0.0" />
</ItemGroup>
</Project>
+8 -8
View File
@@ -251,23 +251,23 @@ namespace Elwig.Helpers.Billing {
try {
return new JsonObject() {
["15kmw"] = Math.Round(y.Distinct().Single(), prec)
["15kmw"] = Math.Round((decimal)y.Distinct().Single(), prec)
};
} catch { }
var data = new JsonObject();
if (y[0] != y[1]) {
data[$"{x[0]}{mode}"] = Math.Round(y[0], prec);
data[$"{x[0]}{mode}"] = Math.Round((decimal)y[0], prec);
}
for (int i = 1; i < x.Length - 1; i++) {
var d1 = Math.Round(y[i] - y[i - 1], prec);
var d2 = Math.Round(y[i + 1] - y[i], prec);
var d1 = Math.Round((decimal)(y[i] - y[i - 1]), prec);
var d2 = Math.Round((decimal)(y[i + 1] - y[i]), prec);
if (d1 != d2) {
data[$"{x[i]}{mode}"] = Math.Round(y[i], prec);
data[$"{x[i]}{mode}"] = Math.Round((decimal)y[i], prec);
}
}
if (y[^1] != y[^2]) {
data[$"{x[^1]}{mode}"] = Math.Round(y[^1], prec);
data[$"{x[^1]}{mode}"] = Math.Round((decimal)y[^1], prec);
}
return data;
}
@@ -275,7 +275,7 @@ namespace Elwig.Helpers.Billing {
protected static JsonNode GraphEntryToJson(GraphEntry entry) {
try {
if (entry.ContractedFlatBonus == null) {
return JsonValue.Create((decimal)entry.DataGraph.DataY.Distinct().Single());
return JsonValue.Create(Math.Round((decimal)entry.DataGraph.DataY.Distinct().Single(), entry.DataGraph.Precision));
}
} catch { }
@@ -287,7 +287,7 @@ namespace Elwig.Helpers.Billing {
curve["data"] = GraphToJson(entry.DataGraph, entry.Mode.ToString().ToLower());
if (entry.ContractedFlatBonus != null) {
curve["ctrd"] = (decimal)entry.ContractedFlatBonus;
curve["ctrd"] = Math.Round((decimal)entry.ContractedFlatBonus, entry.ContractedGraph?.Precision ?? entry.DataGraph.Precision);
} else if (entry.ContractedGraph != null) {
curve["ctrd"] = GraphToJson(entry.ContractedGraph, entry.Mode.ToString().ToLower());
}
+1 -1
View File
@@ -579,7 +579,7 @@ namespace Elwig.Helpers {
body.Add(doc.AsEmailAttachment($"{name}.pdf"));
}
msg.Body = body;
await client!.SendAsync(msg);
await client!.SendAsync(new SmtpSendRequest(msg));
await AddSentMails([(
"email", member.MgNr, member.AdministrativeName,
member.EmailAddresses.OrderBy(a => a.Nr).Select(a => a.Address).ToArray(),
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishDir>bin\Publish</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFramework>net11.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
+1 -1
View File
@@ -954,7 +954,7 @@ namespace Elwig.Windows {
body.Add(doc.AsEmailAttachment($"{name}.pdf"));
}
msg.Body = body;
await client!.SendAsync(msg);
await client!.SendAsync(new SmtpSendRequest(msg));
await Utils.AddSentMails([(
"email", m.MgNr, m.AdministrativeName,
m.EmailAddresses.OrderBy(a => a.Nr).Select(a => a.Address).ToArray(),