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]");
line = System.Console.ReadLine();
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;
else
{
log.Information("Enter persons approximate age");
log.Information("Enter persons birthday day (press enter if not known)");
line = System.Console.ReadLine();
log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
continue;
approximateYears = line;
}
log.Information("Enter persons birthday day (press enter if not known)");
line = System.Console.ReadLine();
log.Information(". . .");
if (!string.IsNullOrEmpty(line))
day = line;
else
{
log.Information("Enter persons approximate age");
line = System.Console.ReadLine();
log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
continue;
approximateYears = line;
}
log.Information("Enter persons birthday year (press enter if not known)");
line = System.Console.ReadLine();
log.Information(". . .");
if (!string.IsNullOrEmpty(line))
year = line;
else
{
log.Information("Enter persons approximate age");
line = System.Console.ReadLine();
log.Information(". . .");
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
continue;
approximateYears = 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
{
day = line;
log.Information("Enter persons birthday year (press enter if not known)");
line = System.Console.ReadLine();
log.Information(". . .");
if (!string.IsNullOrEmpty(line))
year = line;
else
{
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)
dateTime = null;

View File

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