Icon, Tab state persistence

This commit is contained in:
2022-02-03 13:08:35 +01:00
parent 1ea1012703
commit 3da246b3ca
28 changed files with 283 additions and 31 deletions

View File

@@ -10,7 +10,7 @@ namespace FileTime.Core.Models
Task<IReadOnlyList<IElement>?> GetElements(CancellationToken token = default);
Task Refresh();
Task<IItem?> GetByPath(string path);
Task<IItem?> GetByPath(string path, bool acceptDeepestMatch = false);
Task<IContainer> CreateContainer(string name);
Task<IElement> CreateElement(string name);

View File

@@ -76,7 +76,7 @@ namespace FileTime.Core.Models
?.ToList().AsReadOnly();
}
public async Task<IItem?> GetByPath(string path) => await BaseContainer.GetByPath(path);
public async Task<IItem?> GetByPath(string path, bool acceptDeepestMatch = false) => await BaseContainer.GetByPath(path, acceptDeepestMatch);
public IContainer? GetParent() => BaseContainer.GetParent();

View File

@@ -49,7 +49,7 @@ namespace FileTime.Core.Providers
public Task Delete() => throw new NotImplementedException();
public Task<IItem?> GetByPath(string path) => throw new NotImplementedException();
public Task<IItem?> GetByPath(string path, bool acceptDeepestMatch = false) => throw new NotImplementedException();
public IContainer? GetParent() => null;

View File

@@ -46,7 +46,7 @@ namespace FileTime.Core.Timeline
public Task Delete() => Task.CompletedTask;
public async Task<IItem?> GetByPath(string path)
public async Task<IItem?> GetByPath(string path, bool acceptDeepestMatch = false)
{
var paths = path.Split(Constants.SeparatorChar);
@@ -59,7 +59,7 @@ namespace FileTime.Core.Timeline
if (item is IContainer container)
{
return await container.GetByPath(string.Join(Constants.SeparatorChar, paths.Skip(1)));
return await container.GetByPath(string.Join(Constants.SeparatorChar, paths.Skip(1)), acceptDeepestMatch);
}
return null;

View File

@@ -50,7 +50,7 @@ namespace FileTime.Core.Timeline
public Task Delete() => throw new NotSupportedException();
public Task<IItem?> GetByPath(string path)
public Task<IItem?> GetByPath(string path, bool acceptDeepestMatch = false)
{
throw new NotImplementedException();
}