Async core refactor

This commit is contained in:
2022-01-20 18:16:01 +01:00
parent 016100a565
commit 215503a4e3
33 changed files with 761 additions and 463 deletions

View File

@@ -1,19 +1,21 @@
using AsyncEvent;
namespace FileTime.Core.Models
{
public interface IContainer : IItem
{
IReadOnlyList<IItem> Items { get; }
IReadOnlyList<IContainer> Containers { get; }
IReadOnlyList<IElement> Elements { get; }
Task<IReadOnlyList<IItem>?> GetItems(CancellationToken token = default);
Task<IReadOnlyList<IContainer>?> GetContainers(CancellationToken token = default);
Task<IReadOnlyList<IElement>?> GetElements(CancellationToken token = default);
void Refresh();
Task Refresh();
IContainer? GetParent();
IItem? GetByPath(string path);
IContainer CreateContainer(string name);
IElement CreateElement(string name);
Task<IItem?> GetByPath(string path);
Task<IContainer> CreateContainer(string name);
Task<IElement> CreateElement(string name);
bool IsExists(string name);
Task<bool> IsExists(string name);
event EventHandler? Refreshed;
AsyncEventHandler Refreshed { get; }
}
}