From 2361796bbfb007dc7c1cd9f636551230b8dc8edb Mon Sep 17 00:00:00 2001
From: Mike Phares <mikepharesjr@msn.com>
Date: Sat, 14 Dec 2024 09:41:18 -0700
Subject: [PATCH] Compile Warnings

---
 ADO2024/PI1/Helper-2024-01-05.cs              |  4 +-
 ADO2024/PI4/Helper-2024-11-15.cs              |  4 +-
 .../HelperGenealogicalDataCommunication.cs    | 56 -------------------
 Helpers/HelperMarkdown.cs                     |  8 +--
 4 files changed, 8 insertions(+), 64 deletions(-)

diff --git a/ADO2024/PI1/Helper-2024-01-05.cs b/ADO2024/PI1/Helper-2024-01-05.cs
index 81e9a13..dca09a3 100644
--- a/ADO2024/PI1/Helper-2024-01-05.cs
+++ b/ADO2024/PI1/Helper-2024-01-05.cs
@@ -1089,7 +1089,7 @@ internal static partial class Helper20240105
                 port = new System.Uri(uri).Port;
             }
             List<Field> itemFields = (from l in keePassFileGroupEntryStrings select new Field(l.Key, l.Value.Value, 0)).ToList();
-            Login login = new(new Uri[] { new(uri, host, port) }, username, password);
+            Login login = new([new(uri, host, port)], username, password);
             result = new(revisionDate,
                          creationTime,
                          folderId,
@@ -1282,7 +1282,7 @@ internal static partial class Helper20240105
                         revisionDate = item.RevisionDate;
                         notes.Add($"{item.Login.Password} on {item.RevisionDate}");
                     }
-                    login = new(new Uri[] { new(uri, host, port) }, username, password);
+                    login = new([new(uri, host, port)], username, password);
                     result = new(revisionDate,
                                  creationTime,
                                  folderId,
diff --git a/ADO2024/PI4/Helper-2024-11-15.cs b/ADO2024/PI4/Helper-2024-11-15.cs
index 9f7e154..3ad3fa6 100644
--- a/ADO2024/PI4/Helper-2024-11-15.cs
+++ b/ADO2024/PI4/Helper-2024-11-15.cs
@@ -5,7 +5,7 @@ namespace File_Folder_Helper.ADO2024.PI4;
 internal static partial class Helper20241115
 {
 
-#if !BIORAD
+#if BIORAD
 
     internal static void ScanPast(string text, int[] i, string search)
     {
@@ -54,7 +54,7 @@ internal static partial class Helper20241115
         string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly);
         if (files.Length != 1)
             logger.LogError("No files found in {sourceDirectory} with search pattern {searchPattern}", sourceDirectory, searchPattern);
-        logger.LogError("GetComplete is not available in CDE {args[1]}", args[1]);
+        logger.LogError("GetComplete is not available in BioRad {args[1]}", args[1]);
     }
 
 #endif
diff --git a/Helpers/HelperGenealogicalDataCommunication.cs b/Helpers/HelperGenealogicalDataCommunication.cs
index 8285792..e83568c 100644
--- a/Helpers/HelperGenealogicalDataCommunication.cs
+++ b/Helpers/HelperGenealogicalDataCommunication.cs
@@ -990,62 +990,6 @@ internal static partial class HelperGenealogicalDataCommunication
             throw new NotSupportedException();
     }
 
-    [Obsolete]
-    private static PersonHour GetPersonHour(string personDisplayDirectoryName, int hour) =>
-        hour == 0 ? new('U', 'U', 'U') :
-        hour == 1 ? new('U', 'U', 'U') :
-        hour == 2 ? new('U', 'U', 'U') :
-        hour == 3 ? new('A', 'U', 'Y') :
-        hour == 4 ? new('A', 'F', 'Y') :
-        hour == 5 ? new('A', 'M', 'Y') :
-        hour == 6 ? new('A', 'F', 'N') :
-        hour == 7 ? new('A', 'M', 'N') :
-        hour == 13 ? new('D', 'U', 'Y') :
-        hour == 14 ? new('D', 'F', 'Y') :
-        hour == 15 ? new('D', 'M', 'Y') :
-        hour == 16 ? new('D', 'F', 'N') :
-        hour == 17 ? new('D', 'M', 'N') :
-        throw new NotImplementedException(personDisplayDirectoryName);
-
-    [Obsolete]
-    private static string[] GetNewLines(ReadOnlyCollection<string> lines, Name? name, string[] kFiles, string[] mFiles, string[] k2Files, string[] m2Files)
-    {
-        List<string> results = [];
-        string six;
-        int? birthLastLine = null;
-        string slugName = WindowsFileSystem().Replace(string.Concat(name?.ForwardSlashFull), "_");
-        string? title = name?.ForwardSlashFull is null ? null : kFiles.Contains(slugName) ? "1 TITL K" : k2Files.Contains(slugName) ? "1 TITL K2" : mFiles.Contains(slugName) ? "1 TITL M" : m2Files.Contains(slugName) ? "1 TITL M2" : null;
-        for (int i = 0; i < lines.Count; i++)
-        {
-            if (lines[i].Length < 6)
-                throw new NotImplementedException();
-            results.Add(lines[i]);
-            six = lines[i][..6];
-            if (lines[i][0] == '1')
-            {
-                if (six != "1 BIRT")
-                    continue;
-                for (int j = i + 1; j < lines.Count; j++)
-                {
-                    results.Add(lines[j]);
-                    if (lines[j].Length < 7)
-                        throw new NotImplementedException();
-                    if (lines[j][0] == '1')
-                    {
-                        birthLastLine = j;
-                        if (title is not null)
-                            results.Insert(j, title);
-                        break;
-                    }
-                    i++;
-                }
-            }
-        }
-        if (title is not null && birthLastLine is null)
-            results.Add(title);
-        return results.ToArray();
-    }
-
     internal static void FileSystemToGenealogicalDataCommunication(AppSettings appSettings, ILogger<Worker> logger, List<string> args)
     {
         Input input = GetInput(args);
diff --git a/Helpers/HelperMarkdown.cs b/Helpers/HelperMarkdown.cs
index 1b0b95a..759752b 100644
--- a/Helpers/HelperMarkdown.cs
+++ b/Helpers/HelperMarkdown.cs
@@ -713,7 +713,7 @@ internal static partial class HelperMarkdown
         return new(results);
     }
 
-    private static int SortFrontMatter(AppSettings appSettings, ILogger<Worker> logger, Input input, ReadOnlyDictionary<string, MarkdownFileAndLines> relativeToCollection)
+    private static int SortFrontMatter(ReadOnlyDictionary<string, MarkdownFileAndLines> relativeToCollection)
     {
         int result = 0;
         List<string> results = [];
@@ -1049,7 +1049,7 @@ internal static partial class HelperMarkdown
         return (type, h1FromFile);
     }
 
-    private static int SetFrontMatterAndH1(AppSettings appSettings, ILogger<Worker> logger, Input input, ReadOnlyCollection<string> gitOthersModifiedAndDeletedExcludingStandardFiles, ReadOnlyDictionary<string, MarkdownFileAndLines> relativeToCollection)
+    private static int SetFrontMatterAndH1(AppSettings appSettings, ReadOnlyCollection<string> gitOthersModifiedAndDeletedExcludingStandardFiles, ReadOnlyDictionary<string, MarkdownFileAndLines> relativeToCollection)
     {
         int result = 0;
         List<string> results = [];
@@ -1198,13 +1198,13 @@ internal static partial class HelperMarkdown
         Input input = GetInput(args);
         ReadOnlyCollection<string> gitOthersModifiedAndDeletedExcludingStandardFiles = HelperGit.GetOthersModifiedAndDeletedExcludingStandardFiles(input.Source, usePathCombine, cancellationToken);
         ReadOnlyDictionary<string, MarkdownFileAndLines> relativeToCollection = GetRelativeToCollection(appSettings, input, gitOthersModifiedAndDeletedExcludingStandardFiles);
-        updated = SetFrontMatterAndH1(appSettings, logger, input, gitOthersModifiedAndDeletedExcludingStandardFiles, relativeToCollection);
+        updated = SetFrontMatterAndH1(appSettings, gitOthersModifiedAndDeletedExcludingStandardFiles, relativeToCollection);
         if (updated != 0)
         {
             relativeToCollection = GetRelativeToCollection(appSettings, input, gitOthersModifiedAndDeletedExcludingStandardFiles);
             logger.LogInformation("{updated} Markdown file(s) were updated", updated);
         }
-        updated = SortFrontMatter(appSettings, logger, input, relativeToCollection);
+        updated = SortFrontMatter(relativeToCollection);
         if (updated != 0)
         {
             relativeToCollection = GetRelativeToCollection(appSettings, input, gitOthersModifiedAndDeletedExcludingStandardFiles);