This commit is contained in:
Mike Phares 2023-04-01 12:28:40 -07:00
parent b673e99f73
commit 88003892a0
2 changed files with 40 additions and 36 deletions

View File

@ -155,44 +155,48 @@ public class Person
log.Information("Enter persons birthday month (press enter if not known) [MMMM || MMM || MM || M]"); log.Information("Enter persons birthday month (press enter if not known) [MMMM || MMM || MM || M]");
line = System.Console.ReadLine(); line = System.Console.ReadLine();
log.Information(". . ."); log.Information(". . .");
if (!string.IsNullOrEmpty(line)) if (string.IsNullOrEmpty(line))
{
log.Information("Enter persons approximate age");
line = System.Console.ReadLine();
log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
continue;
approximateYears = line;
}
else
{
month = line; month = line;
else log.Information("Enter persons birthday day (press enter if not known)");
{
log.Information("Enter persons approximate age");
line = System.Console.ReadLine(); line = System.Console.ReadLine();
log.Information(". . ."); log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _)) if (string.IsNullOrEmpty(line))
continue; {
approximateYears = line; log.Information("Enter persons approximate age");
} line = System.Console.ReadLine();
log.Information("Enter persons birthday day (press enter if not known)"); log.Information(". . .");
line = System.Console.ReadLine(); if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
log.Information(". . ."); continue;
if (!string.IsNullOrEmpty(line)) approximateYears = line;
day = line; }
else else
{ {
log.Information("Enter persons approximate age"); day = line;
line = System.Console.ReadLine(); log.Information("Enter persons birthday year (press enter if not known)");
log.Information(". . ."); line = System.Console.ReadLine();
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _)) log.Information(". . .");
continue; if (!string.IsNullOrEmpty(line))
approximateYears = line; year = line;
} else
log.Information("Enter persons birthday year (press enter if not known)"); {
line = System.Console.ReadLine(); log.Information("Enter persons approximate age");
log.Information(". . ."); line = System.Console.ReadLine();
if (!string.IsNullOrEmpty(line)) log.Information(". . .");
year = line; if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
else continue;
{ approximateYears = line;
log.Information("Enter persons approximate age"); }
line = System.Console.ReadLine(); }
log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
continue;
approximateYears = line;
} }
if (month is null || day is null || year is null) if (month is null || day is null || year is null)
dateTime = null; dateTime = null;

View File

@ -77,7 +77,7 @@
"Microsoft.Hosting.Lifetime": "Information" "Microsoft.Hosting.Lifetime": "Information"
} }
}, },
"MaxDegreeOfParallelism": 6, "MaxDegreeOfParallelism": 1,
"Serilog": { "Serilog": {
"Using": [ "Using": [
"Serilog.Sinks.Console", "Serilog.Sinks.Console",