Timeless refactor

This commit is contained in:
2022-05-21 14:30:24 +02:00
parent ced0c88a10
commit 6ee5afa632
47 changed files with 571 additions and 181 deletions

View File

@@ -2,7 +2,7 @@ using FileTime.Core.Models;
namespace FileTime.GuiApp.Models;
public interface IHaveAbsolutePath
public interface IHaveFullPath
{
IAbsolutePath Path { get; }
FullName Path { get; }
}

View File

@@ -7,7 +7,7 @@ using IContainer = FileTime.Core.Models.IContainer;
namespace FileTime.GuiApp.ViewModels;
public partial class RootDriveInfo : IHaveAbsolutePath, INotifyPropertyChanged
public partial class RootDriveInfo : IHaveFullPath, INotifyPropertyChanged
{
private readonly DriveInfo _driveInfo;
@@ -25,7 +25,7 @@ public partial class RootDriveInfo : IHaveAbsolutePath, INotifyPropertyChanged
[Notify] public long UsedPercentage => Size == 0 ? 0 : Used * 100 / Size;
public IAbsolutePath Path { get; }
public FullName Path { get; }
public RootDriveInfo(DriveInfo driveInfo, IContainer container)
{
@@ -42,7 +42,7 @@ public partial class RootDriveInfo : IHaveAbsolutePath, INotifyPropertyChanged
{
}
Path = new AbsolutePath(container);
Path = container.FullName ?? throw new NullReferenceException($"Container does not have a {nameof(FullName)}");
Refresh();
}