Compile Warnings

This commit is contained in:
Mike Phares 2024-12-14 09:41:18 -07:00
parent 9afc7360b9
commit 2361796bbf
4 changed files with 8 additions and 64 deletions

View File

@ -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,

View File

@ -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

View File

@ -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);

View File

@ -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);