From ff3bd5cea5fcdae4b2bd147572b5655fb1f9c187 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Mon, 29 Jan 2024 12:13:15 +0100 Subject: [PATCH] Dtos: Use collection initializer --- Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs | 4 ++-- Elwig/Models/Dtos/MemberDeliveryPerVariantData.cs | 4 ++-- Elwig/Models/Dtos/OverUnderDeliveryData.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs b/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs index 233be8f..e8a11b5 100644 --- a/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs +++ b/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Elwig.Models.Dtos { public class DeliveryConfirmationDeliveryData : DataTable { - private static readonly (string, string, string?, int)[] FieldNames = new[] { + private static readonly (string, string, string?, int)[] FieldNames = [ ("LsNr", "LsNr.", null, 26), ("DPNr", "Pos.", null, 8), ("Variety", "Sorte", null, 40), @@ -17,7 +17,7 @@ namespace Elwig.Models.Dtos { ("Gradation", "Gradation", "°Oe|°KMW", 32), ("Buckets", "Flächenbindung", "|kg", 36), ("Weight", "Gewicht", "kg", 16), - }; + ]; private readonly int MgNr; diff --git a/Elwig/Models/Dtos/MemberDeliveryPerVariantData.cs b/Elwig/Models/Dtos/MemberDeliveryPerVariantData.cs index 972aa2c..9d562e3 100644 --- a/Elwig/Models/Dtos/MemberDeliveryPerVariantData.cs +++ b/Elwig/Models/Dtos/MemberDeliveryPerVariantData.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace Elwig.Models.Dtos { public class MemberDeliveryPerVariantData : DataTable { - private static readonly (string, string, string?, int)[] FieldNames = new[] { + private static readonly (string, string, string?, int)[] FieldNames = [ ("MgNr", "MgNr.", null, 12), ("Name", "Name", null, 40), ("GivenName", "Vorname", null, 40), @@ -20,7 +20,7 @@ namespace Elwig.Models.Dtos { ("Weights", "Geliefert", "kg", 22), ("Areas", "Fläche", "m²", 22), ("Yields", "Ertrag", "kg/ha", 22), - }; + ]; public MemberDeliveryPerVariantData(IEnumerable rows, int year) : diff --git a/Elwig/Models/Dtos/OverUnderDeliveryData.cs b/Elwig/Models/Dtos/OverUnderDeliveryData.cs index 650cbae..be643eb 100644 --- a/Elwig/Models/Dtos/OverUnderDeliveryData.cs +++ b/Elwig/Models/Dtos/OverUnderDeliveryData.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Elwig.Models.Dtos { public class OverUnderDeliveryData : DataTable { - private static readonly (string, string, string?, int)[] FieldNames = new[] { + private static readonly (string, string, string?, int)[] FieldNames = [ ("MgNr", "MgNr.", null, 12), ("Name", "Name", null, 40), ("GivenName", "Vorname", null, 40), @@ -19,7 +19,7 @@ namespace Elwig.Models.Dtos { ("DeliveryRight", "Lieferrecht", "kg", 22), ("Weight", "Geliefert", "kg", 22), ("OverUnderDelivery", "Über-/Unterliefert", "kg|%", 34), - }; + ]; public OverUnderDeliveryData(IEnumerable rows, int year) : base($"Über-Unterlieferungen", $"Über- und Unterlieferungen laut gezeichneten Geschäftsanteilen {year}", rows, FieldNames) {