Made useable by Helpers

This commit is contained in:
2025-07-20 08:31:03 -07:00
parent d67d423ef3
commit 518af493a8
133 changed files with 417 additions and 372 deletions

View File

@ -1,7 +1,7 @@
using Microsoft.Extensions.Configuration;
using System.Text.Json;
using System.Text.Json.Serialization;
using View_by_Distance.Shared.Models;
using Phares.Shared.Models;
namespace View_by_Distance.Windows.Models;

View File

@ -1,4 +1,5 @@
using Phares.Shared.Models.Properties;
using System.Text.Json;
using System.Text.Json.Serialization;
@ -9,7 +10,7 @@ public record WindowsSettings(string Company,
int MaxDegreeOfParallelism,
string? Page,
string[] SidecarExtensions,
bool VerifyOnly) : Shared.Models.Properties.IWindowsSettings
bool VerifyOnly) : IWindowsSettings
{
public override string ToString()

View File

@ -23,7 +23,7 @@ public class Program
{
if (args is null)
throw new Exception("args is null!");
Shared.Models.Console console = new();
Phares.Shared.Models.Console console = new();
_ = new Windows(args, logger, appSettings, silentIndex > -1, console);
}
catch (Exception ex)

View File

@ -6,10 +6,10 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Text.Json;
using View_by_Distance.Metadata.Models;
using View_by_Distance.Metadata.Models.Stateless;
using View_by_Distance.Shared.Models;
using View_by_Distance.Shared.Models.Stateless;
using Phares.Metadata.Models;
using Phares.Metadata.Models.Stateless;
using Phares.Shared.Models;
using Phares.Shared.Models.Stateless;
using View_by_Distance.Windows.Models;
namespace View_by_Distance.Windows;
@ -171,14 +171,19 @@ public partial class Windows : IWindows, IDisposable
long epoch = new DateTime(1970, 1, 1).Ticks;
long net8ReleaseDate = new DateTime(2023, 11, 14).Ticks;
long net9ReleaseDate = new DateTime(2024, 11, 12).Ticks;
long net10ReleaseDate = new DateTime(2026, 01, 01).Ticks;
double net8TotalSeconds = new TimeSpan(net8ReleaseDate - epoch).TotalSeconds;
double net9TotalSeconds = new TimeSpan(net9ReleaseDate - epoch).TotalSeconds;
double net10TotalSeconds = new TimeSpan(net10ReleaseDate - epoch).TotalSeconds;
logger?.LogInformation("It has been {net8TotalSeconds} seconds since net8 was released", net8TotalSeconds);
logger?.LogInformation("It has been {net9TotalSeconds} seconds since net9 was released", net9TotalSeconds);
logger?.LogInformation("It has been {net10TotalSeconds} seconds since net10 was released", net10TotalSeconds);
double net8TotalHours = Math.Floor((DateTimeOffset.UtcNow.ToUnixTimeSeconds() - net8TotalSeconds) / secondsInAHour);
double net9TotalHours = Math.Floor((DateTimeOffset.UtcNow.ToUnixTimeSeconds() - net9TotalSeconds) / secondsInAHour);
double net10TotalHours = Math.Floor((DateTimeOffset.UtcNow.ToUnixTimeSeconds() - net10TotalSeconds) / secondsInAHour);
logger?.LogInformation("It has been {net8TotalHours} hours since net8 was released", net8TotalHours);
logger?.LogInformation("It has been {net9TotalHours} hours since net9 was released", net9TotalHours);
logger?.LogInformation("It has been {net10TotalHours} hours since net10 was released", net10TotalHours);
}
private void WindowsWork(ILogger<Program>? logger, AppSettings appSettings, IWindows windows)