From 132c011e6910c1a6db20bf798d29b296ba2b4a50 Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Wed, 9 Oct 2024 17:52:14 +0300 Subject: [PATCH] ref - Cleaned up some code --- Type: ref Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- VisualCard.Calendar/Parsers/VCalendarParserTools.cs | 1 - VisualCard.Calendar/Parsers/VCalendarPartType.cs | 1 - VisualCard.Calendar/Parts/Calendar.cs | 2 +- VisualCard.Extras/Misc/CardGenerator.cs | 2 -- VisualCard/Parsers/VcardParser.cs | 1 - VisualCard/Parts/BaseCardPartInfo.cs | 1 - VisualCard/Parts/Card.cs | 2 +- 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/VisualCard.Calendar/Parsers/VCalendarParserTools.cs b/VisualCard.Calendar/Parsers/VCalendarParserTools.cs index 4bb2dc0..060cec3 100644 --- a/VisualCard.Calendar/Parsers/VCalendarParserTools.cs +++ b/VisualCard.Calendar/Parsers/VCalendarParserTools.cs @@ -27,7 +27,6 @@ using VisualCard.Calendar.Parts.Implementations.TimeZone; using VisualCard.Calendar.Parts.Implementations.Todo; using VisualCard.Calendar.Parts.Implementations.Legacy; -using System.IO; using VisualCard.Calendar.Parts.Implementations.FreeBusy; using VisualCard.Parsers; diff --git a/VisualCard.Calendar/Parsers/VCalendarPartType.cs b/VisualCard.Calendar/Parsers/VCalendarPartType.cs index 36ade95..1f28b81 100644 --- a/VisualCard.Calendar/Parsers/VCalendarPartType.cs +++ b/VisualCard.Calendar/Parsers/VCalendarPartType.cs @@ -20,7 +20,6 @@ using System; using VisualCard.Calendar.Parts; using VisualCard.Parsers.Arguments; -using VisualCard.Parts; using VisualCard.Parts.Enums; namespace VisualCard.Calendar.Parsers diff --git a/VisualCard.Calendar/Parts/Calendar.cs b/VisualCard.Calendar/Parts/Calendar.cs index 7ff932b..488edea 100644 --- a/VisualCard.Calendar/Parts/Calendar.cs +++ b/VisualCard.Calendar/Parts/Calendar.cs @@ -234,7 +234,7 @@ internal BaseCalendarPartInfo[] GetPartsArray(Type partType, CalendarPartsArrayE // Cast the values var value = partsArray[key]; - BaseCalendarPartInfo[] parts = value.ToArray(); + BaseCalendarPartInfo[] parts = [.. value]; // Now, return the value return parts; diff --git a/VisualCard.Extras/Misc/CardGenerator.cs b/VisualCard.Extras/Misc/CardGenerator.cs index 07c9c88..0d80248 100644 --- a/VisualCard.Extras/Misc/CardGenerator.cs +++ b/VisualCard.Extras/Misc/CardGenerator.cs @@ -24,8 +24,6 @@ using Textify.Data.NameGen; using VisualCard.Parsers; using VisualCard.Parts; -using VisualCard.Parts.Enums; -using VisualCard.Parts.Implementations; namespace VisualCard.Extras.Misc { diff --git a/VisualCard/Parsers/VcardParser.cs b/VisualCard/Parsers/VcardParser.cs index d423567..dde39ab 100644 --- a/VisualCard/Parsers/VcardParser.cs +++ b/VisualCard/Parsers/VcardParser.cs @@ -27,7 +27,6 @@ using VisualCard.Parsers.Arguments; using VisualCard.Parts; using VisualCard.Parts.Enums; -using VisualCard.Parts.Implementations; namespace VisualCard.Parsers { diff --git a/VisualCard/Parts/BaseCardPartInfo.cs b/VisualCard/Parts/BaseCardPartInfo.cs index 42f2900..35d0146 100644 --- a/VisualCard/Parts/BaseCardPartInfo.cs +++ b/VisualCard/Parts/BaseCardPartInfo.cs @@ -22,7 +22,6 @@ using System.Diagnostics; using System.Linq; using VisualCard.Parsers.Arguments; -using VisualCard.Parts.Comparers; namespace VisualCard.Parts { diff --git a/VisualCard/Parts/Card.cs b/VisualCard/Parts/Card.cs index 01d0d8e..2d11d26 100644 --- a/VisualCard/Parts/Card.cs +++ b/VisualCard/Parts/Card.cs @@ -163,7 +163,7 @@ public BaseCardPartInfo[] GetPartsArray(Type partType, PartsArrayEnum key) // Cast the values var value = partsArray[key]; - BaseCardPartInfo[] parts = value.ToArray(); + BaseCardPartInfo[] parts = [.. value]; // Now, return the value return parts;