Made useable by Helpers
This commit is contained in:
@ -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.Rename.Models;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
using Phares.Shared.Models.Properties;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@ -21,7 +22,7 @@ public record RenameSettings(string Company,
|
||||
string[] SidecarExtensions,
|
||||
bool SkipIdFiles,
|
||||
int ValidationImageDeterministicHashCodeId,
|
||||
string ValidationImageFile) : Shared.Models.Properties.IRenameSettings
|
||||
string ValidationImageFile) : IRenameSettings
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
|
@ -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 Rename(args, logger, appSettings, silentIndex > -1, console);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -7,11 +7,11 @@ 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 Phares.Metadata.Models;
|
||||
using Phares.Metadata.Models.Stateless;
|
||||
using View_by_Distance.Rename.Models;
|
||||
using View_by_Distance.Shared.Models;
|
||||
using View_by_Distance.Shared.Models.Stateless;
|
||||
using Phares.Shared.Models;
|
||||
using Phares.Shared.Models.Stateless;
|
||||
|
||||
namespace View_by_Distance.Rename;
|
||||
|
||||
@ -152,14 +152,19 @@ public partial class Rename : IRename, 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 RenameWork(ILogger<Program>? logger, AppSettings appSettings, IRename rename)
|
||||
|
Reference in New Issue
Block a user