nuget bump
2023-11-02 2023-11-08 net8.0 editorconfig NuGet NuSpec Kanban
This commit is contained in:
@ -73,7 +73,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static ReadOnlyDictionary<long, ReadOnlyCollection<string>> Convert(Dictionary<long, List<string>> keyValuePairs)
|
||||
{
|
||||
Dictionary<long, ReadOnlyCollection<string>> results = new();
|
||||
Dictionary<long, ReadOnlyCollection<string>> results = [];
|
||||
foreach (KeyValuePair<long, List<string>> keyValuePair in keyValuePairs)
|
||||
results.Add(keyValuePair.Key, new(keyValuePair.Value));
|
||||
return new(results);
|
||||
@ -81,7 +81,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static Dictionary<string, ReadOnlyCollection<ReadOnlyCollection<string>>> Convert(Dictionary<string, List<ReadOnlyCollection<string>>> keyValuePairs)
|
||||
{
|
||||
Dictionary<string, ReadOnlyCollection<ReadOnlyCollection<string>>> results = new();
|
||||
Dictionary<string, ReadOnlyCollection<ReadOnlyCollection<string>>> results = [];
|
||||
foreach (KeyValuePair<string, List<ReadOnlyCollection<string>>> keyValuePair in keyValuePairs)
|
||||
results.Add(keyValuePair.Key, new(keyValuePair.Value));
|
||||
return new(results);
|
||||
@ -91,13 +91,13 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
{
|
||||
List<string> results;
|
||||
if (person is null)
|
||||
results = new() { "Id", "First-Name", "Last-Name", "Birth-Date", "Sex", "Address", "City", "State", "Zip", "Phone", "E-mail", "Facebook", "Facebook-Id", "Comment", "U-Id" };
|
||||
results = ["Id", "First-Name", "Last-Name", "Birth-Date", "Sex", "Address", "City", "State", "Zip", "Phone", "E-mail", "Facebook", "Facebook-Id", "Comment", "U-Id"];
|
||||
else
|
||||
{
|
||||
string? facebook = GetFaceBook(person);
|
||||
string? facebookId = GetFaceBookId(person);
|
||||
results = new()
|
||||
{
|
||||
results =
|
||||
[
|
||||
person.Id.ToString(),
|
||||
string.Concat(person.Name?.Given),
|
||||
string.Concat(person.Name?.Sur),
|
||||
@ -113,7 +113,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
string.Concat(facebookId),
|
||||
string.Empty,
|
||||
string.Concat(person.UId)
|
||||
};
|
||||
];
|
||||
}
|
||||
return new(results);
|
||||
}
|
||||
@ -122,7 +122,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
{
|
||||
string[] results;
|
||||
string key;
|
||||
List<(string? Index, string Key)> collection = new();
|
||||
List<(string? Index, string Key)> collection = [];
|
||||
foreach (Family family in familyCollection)
|
||||
{
|
||||
if (family.Id is null)
|
||||
@ -138,7 +138,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static Dictionary<string, List<ReadOnlyCollection<string>>> Convert(ReadOnlyCollection<string> distinctSortedKKeys)
|
||||
{
|
||||
Dictionary<string, List<ReadOnlyCollection<string>>> results = new();
|
||||
Dictionary<string, List<ReadOnlyCollection<string>>> results = [];
|
||||
ReadOnlyCollection<string> collection;
|
||||
List<ReadOnlyCollection<string>>? objectCollection;
|
||||
foreach (string key in distinctSortedKKeys)
|
||||
@ -147,7 +147,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
continue;
|
||||
if (!results.TryGetValue(key, out objectCollection))
|
||||
{
|
||||
results.Add(key, new());
|
||||
results.Add(key, []);
|
||||
if (!results.TryGetValue(key, out objectCollection))
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
@ -159,7 +159,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static ReadOnlyCollection<string> GetHeaderLines(string startsWith, string[] sourceLines)
|
||||
{
|
||||
List<string> results = new();
|
||||
List<string> results = [];
|
||||
for (int i = 0; i < sourceLines.Length; i++)
|
||||
{
|
||||
if (sourceLines[i].StartsWith(startsWith))
|
||||
@ -179,7 +179,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static Dictionary<string, List<string>> GetTxtFileCollection(Input input)
|
||||
{
|
||||
Dictionary<string, List<string>> results = new();
|
||||
Dictionary<string, List<string>> results = [];
|
||||
string[] lines;
|
||||
string[] directories;
|
||||
string directoryName;
|
||||
@ -188,7 +188,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
List<string>? collectionA;
|
||||
List<string>? collectionB;
|
||||
string siblingDirectoryName;
|
||||
string[] files = input.SingletonDirectory is null || !Directory.Exists(input.SingletonDirectory) ? Array.Empty<string>() : Directory.GetFiles(input.SingletonDirectory, "*.txt", SearchOption.AllDirectories);
|
||||
string[] files = input.SingletonDirectory is null || !Directory.Exists(input.SingletonDirectory) ? [] : Directory.GetFiles(input.SingletonDirectory, "*.txt", SearchOption.AllDirectories);
|
||||
foreach (string file in files)
|
||||
{
|
||||
sourceDirectory = Path.GetDirectoryName(file);
|
||||
@ -203,7 +203,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
directoryName = Path.GetFileName(sourceDirectory);
|
||||
if (!results.TryGetValue(directoryName, out collectionA))
|
||||
{
|
||||
results.Add(directoryName, new());
|
||||
results.Add(directoryName, []);
|
||||
if (!results.TryGetValue(directoryName, out collectionA))
|
||||
throw new Exception();
|
||||
}
|
||||
@ -219,7 +219,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
siblingDirectoryName = Path.GetFileName(directory);
|
||||
if (!results.TryGetValue(siblingDirectoryName, out collectionB))
|
||||
{
|
||||
results.Add(siblingDirectoryName, new());
|
||||
results.Add(siblingDirectoryName, []);
|
||||
if (!results.TryGetValue(siblingDirectoryName, out collectionB))
|
||||
throw new Exception();
|
||||
}
|
||||
@ -270,8 +270,8 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
bool moreAdded = false;
|
||||
List<string>? collection;
|
||||
DateOnly? dateOnly = null;
|
||||
List<string> distinct = new();
|
||||
List<string> @continue = new();
|
||||
List<string> distinct = [];
|
||||
List<string> @continue = [];
|
||||
for (int j = i + 1; j < lines.Count; j++)
|
||||
{
|
||||
if (lines[j][0] == '1')
|
||||
@ -324,7 +324,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
string seven;
|
||||
string? note = null;
|
||||
DateOnly? dateOnly = null;
|
||||
List<string> @continue = new();
|
||||
List<string> @continue = [];
|
||||
bool? isDead = lines[i].Length == 8 && lines[i][..8] == "1 DEAT Y" ? true : lines[i].Length == 8 && lines[i][..8] == "1 DEAT N" ? false : null;
|
||||
for (int j = i + 1; j < lines.Count; j++)
|
||||
{
|
||||
@ -364,7 +364,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
string seven;
|
||||
string? note = null;
|
||||
DateOnly? dateOnly = null;
|
||||
List<string> @continue = new();
|
||||
List<string> @continue = [];
|
||||
for (int j = i + 1; j < lines.Count; j++)
|
||||
{
|
||||
if (lines[j][0] == '1')
|
||||
@ -399,11 +399,11 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static string[] GetNewLines(ReadOnlyCollection<string> lines, Birth? birth)
|
||||
{
|
||||
List<string> results = new();
|
||||
List<string> results = [];
|
||||
string six;
|
||||
string text;
|
||||
string seven;
|
||||
List<string> @continue = birth is null ? new() : birth.Continue.ToList();
|
||||
List<string> @continue = birth is null ? [] : birth.Continue.ToList();
|
||||
for (int i = 0; i < lines.Count; i++)
|
||||
{
|
||||
if (birth is null)
|
||||
@ -447,7 +447,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static List<long> GetIdsWhenPersonHasTitle(ReadOnlyDictionary<long, Person> people)
|
||||
{
|
||||
List<long> results = new();
|
||||
List<long> results = [];
|
||||
foreach (KeyValuePair<long, Person> keyValuePair in people)
|
||||
{
|
||||
if (keyValuePair.Value.Title is null)
|
||||
@ -459,7 +459,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static ReadOnlyCollection<GenealogicalDataCommunicationRelation> GetRelations(ReadOnlyCollection<ReadOnlyCollection<string>> familyGroupLines)
|
||||
{
|
||||
List<GenealogicalDataCommunicationRelation> results = new();
|
||||
List<GenealogicalDataCommunicationRelation> results = [];
|
||||
int id;
|
||||
string relation;
|
||||
string[] segments;
|
||||
@ -585,12 +585,12 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
{
|
||||
GenealogicalDataCommunicationCollections result;
|
||||
long? id;
|
||||
List<string> lines = new();
|
||||
List<string> lines = [];
|
||||
List<string> footerLines = [];
|
||||
const string startsWith = "0 @";
|
||||
List<string> footerLines = new();
|
||||
Dictionary<long, List<string>> keyValuePairs = new();
|
||||
List<ReadOnlyCollection<string>> familyGroupLines = new();
|
||||
string[] sourceLines = string.IsNullOrEmpty(input.GenealogicalDataCommunicationFile) || !File.Exists(input.GenealogicalDataCommunicationFile) ? Array.Empty<string>() : File.ReadAllLines(input.GenealogicalDataCommunicationFile);
|
||||
Dictionary<long, List<string>> keyValuePairs = [];
|
||||
List<ReadOnlyCollection<string>> familyGroupLines = [];
|
||||
string[] sourceLines = string.IsNullOrEmpty(input.GenealogicalDataCommunicationFile) || !File.Exists(input.GenealogicalDataCommunicationFile) ? [] : File.ReadAllLines(input.GenealogicalDataCommunicationFile);
|
||||
ReadOnlyCollection<string> headerLines = GetHeaderLines(startsWith, sourceLines);
|
||||
for (int i = headerLines.Count; i < sourceLines.Length; i++)
|
||||
{
|
||||
@ -632,7 +632,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
}
|
||||
if (id is null)
|
||||
throw new Exception(string.Join(Environment.NewLine, lines));
|
||||
keyValuePairs.Add(id.Value, new());
|
||||
keyValuePairs.Add(id.Value, []);
|
||||
if (lines.Count == 0)
|
||||
continue;
|
||||
keyValuePairs[id.Value].AddRange(lines);
|
||||
@ -648,7 +648,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static ReadOnlyDictionary<long, Person> GetPeople(Input input, GenealogicalDataCommunicationCollections genealogicalDataCommunicationCollections)
|
||||
{
|
||||
Dictionary<long, Person> results = new();
|
||||
Dictionary<long, Person> results = [];
|
||||
long? id;
|
||||
char? sex;
|
||||
Name? name;
|
||||
@ -724,11 +724,11 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
Collections result;
|
||||
long personKey;
|
||||
char[] ageCollection;
|
||||
Dictionary<long, string> idToName = new();
|
||||
Dictionary<long, long> idToPersonKey = new();
|
||||
Dictionary<long, string> idToGivenName = new();
|
||||
List<PersonExport> collection = [];
|
||||
Dictionary<long, string> idToName = [];
|
||||
Dictionary<long, long> idToPersonKey = [];
|
||||
Dictionary<long, string> idToGivenName = [];
|
||||
int length = appSettings.PersonBirthdayFormat.Length;
|
||||
List<PersonExport> collection = new();
|
||||
foreach (KeyValuePair<long, Person> keyValuePair in people)
|
||||
{
|
||||
if (keyValuePair.Value.Birth?.Note is null)
|
||||
@ -742,7 +742,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
personKey = dateTime.Ticks;
|
||||
idToPersonKey.Add(keyValuePair.Key, personKey);
|
||||
idToName.Add(keyValuePair.Key, WindowsFileSystem().Replace(keyValuePair.Value.Name.ForwardSlashFull, "_"));
|
||||
ageCollection = keyValuePair.Value.Birth.Continue.Count == 0 ? Array.Empty<char>() : keyValuePair.Value.Birth.Continue[0].ToArray();
|
||||
ageCollection = keyValuePair.Value.Birth.Continue.Count == 0 ? [] : keyValuePair.Value.Birth.Continue[0].ToArray();
|
||||
idToGivenName.Add(keyValuePair.Key, string.IsNullOrEmpty(keyValuePair.Value.Name.Given) ? WindowsFileSystem().Replace(keyValuePair.Value.Name.ForwardSlashFull, "_") : WindowsFileSystem().Replace(keyValuePair.Value.Name.Given, "_"));
|
||||
collection.Add(new(keyValuePair.Key, new(keyValuePair.Value.Lines), keyValuePair.Value.Birth.Note, ageCollection, dateTime, personKey));
|
||||
}
|
||||
@ -752,7 +752,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static List<Family> GetFamilyCollection(ReadOnlyCollection<ReadOnlyCollection<string>> familyGroupLines, ReadOnlyDictionary<long, Person> people, ReadOnlyDictionary<long, long> idToPersonKey, ReadOnlyDictionary<long, string> idToName, ReadOnlyDictionary<long, string> idToGivenName)
|
||||
{
|
||||
List<Family> results = new();
|
||||
List<Family> results = [];
|
||||
string? name;
|
||||
long personKey;
|
||||
Person? person;
|
||||
@ -862,8 +862,8 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
|
||||
private static void WriteGenealogicalDataCommunicationCollections(ILogger<Worker> logger, Input input, GenealogicalDataCommunicationCollections genealogicalDataCommunicationCollections, ReadOnlyDictionary<long, Person> people)
|
||||
{
|
||||
List<string> lines = new();
|
||||
List<string> allLines = new();
|
||||
List<string> lines = [];
|
||||
List<string> allLines = [];
|
||||
if (genealogicalDataCommunicationCollections.HeaderLines.Count > 0)
|
||||
{
|
||||
allLines.AddRange(genealogicalDataCommunicationCollections.HeaderLines);
|
||||
@ -931,8 +931,8 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
long count = ticks;
|
||||
string rootDirectory;
|
||||
string approximateYears;
|
||||
List<string> distinct = new();
|
||||
List<string> duplicates = new();
|
||||
List<string> distinct = [];
|
||||
List<string> duplicates = [];
|
||||
string personDisplayDirectoryName;
|
||||
foreach (PersonExport personExport in personExportCollection)
|
||||
{
|
||||
@ -1010,7 +1010,7 @@ internal static partial class HelperGenealogicalDataCommunication
|
||||
[Obsolete]
|
||||
private static string[] GetNewLines(ReadOnlyCollection<string> lines, Name? name, string[] kFiles, string[] mFiles, string[] k2Files, string[] m2Files)
|
||||
{
|
||||
List<string> results = new();
|
||||
List<string> results = [];
|
||||
string six;
|
||||
int? birthLastLine = null;
|
||||
string slugName = WindowsFileSystem().Replace(string.Concat(name?.ForwardSlashFull), "_");
|
||||
|
Reference in New Issue
Block a user