diff --git a/Date-Group/DateGroup.cs b/Date-Group/DateGroup.cs index e0fbcea..699b44f 100644 --- a/Date-Group/DateGroup.cs +++ b/Date-Group/DateGroup.cs @@ -251,11 +251,11 @@ public class DateGroup if (topDirectoryName.Length > 1) _ = destinationDirectoryName.Append(topDirectoryName); if (_Configuration.BySeason) - directoryNames.AddRange(new string[] { $"{destinationDirectoryName} {year} {seasonName}" }); + directoryNames.AddRange([$"{destinationDirectoryName} {year} {seasonName}"]); else if (_Configuration.ByDay) - directoryNames.AddRange(new string[] { $"{destinationDirectoryName} {year}", $"{weekOfYear}) {year}-{day}" }); + directoryNames.AddRange([$"{destinationDirectoryName} {year}", $"{weekOfYear}) {year}-{day}"]); else if (_Configuration.ByWeek) - directoryNames.AddRange(new string[] { $"{destinationDirectoryName} {year}", $"{weekOfYear}) {year} {month}" }); + directoryNames.AddRange([$"{destinationDirectoryName} {year}", $"{weekOfYear}) {year} {month}"]); else throw new Exception(); } diff --git a/Drag-Drop-Explorer/Program.cs b/Drag-Drop-Explorer/Program.cs index 3a8d3c2..e8fe67e 100644 --- a/Drag-Drop-Explorer/Program.cs +++ b/Drag-Drop-Explorer/Program.cs @@ -6,10 +6,8 @@ public class Program /// The main entry point for the application. /// [STAThread] - private static void Main() - { + private static void Main() => // ApplicationConfiguration.Initialize(); Application.Run(new DragDropExplorer()); - } } \ No newline at end of file diff --git a/Drag-Drop-Move/Program.cs b/Drag-Drop-Move/Program.cs index db27d9c..8227058 100644 --- a/Drag-Drop-Move/Program.cs +++ b/Drag-Drop-Move/Program.cs @@ -6,10 +6,8 @@ public class Program /// The main entry point for the application. /// [STAThread] - private static void Main() - { + private static void Main() => // ApplicationConfiguration.Initialize(); Application.Run(new DragDropMove()); - } } \ No newline at end of file diff --git a/Drag-Drop-Search/Program.cs b/Drag-Drop-Search/Program.cs index 81efa6b..eaf86ac 100644 --- a/Drag-Drop-Search/Program.cs +++ b/Drag-Drop-Search/Program.cs @@ -8,11 +8,9 @@ public class Program /// The main entry point for the application. /// [STAThread] - private static void Main() - { + private static void Main() => // ApplicationConfiguration.Initialize(); Application.Run(new DragDropSearch()); - } private static Item[] GetFilterItems(Models.Configuration configuration, Container container) { diff --git a/Drag-Drop-Set-Property-Item/Program.cs b/Drag-Drop-Set-Property-Item/Program.cs index dc3a9f4..f43c06e 100644 --- a/Drag-Drop-Set-Property-Item/Program.cs +++ b/Drag-Drop-Set-Property-Item/Program.cs @@ -6,10 +6,8 @@ public class Program /// The main entry point for the application. /// [STAThread] - private static void Main() - { + private static void Main() => // ApplicationConfiguration.Initialize(); Application.Run(new DragDropSetPropertyItem()); - } } \ No newline at end of file diff --git a/Instance/DlibDotNet.cs b/Instance/DlibDotNet.cs index 7615209..2f5ec56 100644 --- a/Instance/DlibDotNet.cs +++ b/Instance/DlibDotNet.cs @@ -117,7 +117,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable _MapConfiguration = Get(configuration, _DistanceLimits, _Faces.FileNameExtension, _Faces.HiddenFileNameExtension, _FaceParts.FileNameExtension); _Distance = new(configuration.DistanceMoveUnableToMatch, configuration.DistanceRenameToMatch, configuration.FaceConfidencePercent, configuration.RangeDistanceTolerance, configuration.RectangleIntersectMinimums); if (_PropertyRootExistedBefore || !_ArgZeroIsConfigurationRootDirectory) - personContainers = new(new List()); + personContainers = new([]); else { int totalSeconds = (int)Math.Floor(new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds); @@ -1126,7 +1126,6 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable List> sourceDirectoryChanges, Dictionary> fileNameToCollection, Container container, - int index, Item item, DateTime[] containerDateTimes, bool? isFocusRelativePath) @@ -1309,7 +1308,6 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable sourceDirectoryChanges, fileNameToCollection, container, - index: i, filteredItems[i], containerDateTimes, isFocusRelativePath); diff --git a/Mirror-Length/MirrorLength.cs b/Mirror-Length/MirrorLength.cs index aa15b08..affc0da 100644 --- a/Mirror-Length/MirrorLength.cs +++ b/Mirror-Length/MirrorLength.cs @@ -193,6 +193,7 @@ public class MirrorLength { string message = nameof(MirrorLength); List<(string, string, int)> collectionForMarkDown; + logger?.LogDebug("{method}", nameof(MirrorLengthFilesInDirectories)); bool inPlaceSave = _PropertyConfiguration.RootDirectory.First() == _AppSettings.Destination; if (!inPlaceSave) collectionForMarkDown = []; diff --git a/Property/Models/A_Property.cs b/Property/Models/A_Property.cs index e7c81b8..5f4bc70 100644 --- a/Property/Models/A_Property.cs +++ b/Property/Models/A_Property.cs @@ -168,7 +168,7 @@ public class A_Property { _AngleBracketCollection.Clear(); if (!anyNullOrNoIsUniqueFileName) - _AngleBracketCollection.AddRange(new[] { Path.Combine(aResultsFullGroupDirectory, "<>") }); + _AngleBracketCollection.AddRange([Path.Combine(aResultsFullGroupDirectory, "<>")]); else _AngleBracketCollection.AddRange(IResult.GetDirectoryInfoCollection(_PropertyConfiguration, sourceDirectory, diff --git a/Rename/Rename.cs b/Rename/Rename.cs index 9fea2ac..e857ed8 100644 --- a/Rename/Rename.cs +++ b/Rename/Rename.cs @@ -251,7 +251,7 @@ public class Rename catch (Exception) { continue; } CommandTask result = Cli.Wrap("ffmpeg.exe") // .WithArguments(new[] { "-ss", "00:00:00", "-t", "00:00:00", "-i", files[i], "-qscale:v", "2", "-r", "0.01", $"{fileHolder.Name}-%4d.jpg" }) - .WithArguments(new[] { "-i", files[i], "-vframes", "1", $"{fileHolder.Name}-%4d.jpg" }) + .WithArguments(["-i", files[i], "-vframes", "1", $"{fileHolder.Name}-%4d.jpg"]) .WithWorkingDirectory(fileHolder.DirectoryFullPath) .ExecuteAsync(); result.Task.Wait(); diff --git a/Shared/Models/Stateless/Methods/MetadataFileCollection.cs b/Shared/Models/Stateless/Methods/MetadataFileCollection.cs index 1307bb2..3497b87 100644 --- a/Shared/Models/Stateless/Methods/MetadataFileCollection.cs +++ b/Shared/Models/Stateless/Methods/MetadataFileCollection.cs @@ -3,7 +3,7 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods; internal abstract class MetadataFileCollection { - internal static Dictionary>> GetDefaultValue() => new(); // {{1}}SingletonValue + internal static Dictionary>> GetDefaultValue() => []; // {{1}}SingletonValue // ...