WIP CommandScheduler UI
This commit is contained in:
@@ -5,7 +5,7 @@ using FileTime.Core.Timeline;
|
||||
|
||||
namespace FileTime.Core.Command.Delete;
|
||||
|
||||
public class DeleteCommand : IExecutableCommand
|
||||
public class DeleteCommand : CommandBase, IExecutableCommand
|
||||
{
|
||||
private readonly IContentAccessorFactory _contentAccessorFactory;
|
||||
private readonly ITimelessContentProvider _timelessContentProvider;
|
||||
@@ -15,18 +15,19 @@ public class DeleteCommand : IExecutableCommand
|
||||
public DeleteCommand(
|
||||
IContentAccessorFactory contentAccessorFactory,
|
||||
ITimelessContentProvider timelessContentProvider)
|
||||
: base("Delete")
|
||||
{
|
||||
_contentAccessorFactory = contentAccessorFactory;
|
||||
_timelessContentProvider = timelessContentProvider;
|
||||
}
|
||||
|
||||
public Task<CanCommandRun> CanRun(PointInTime currentTime)
|
||||
public override Task<CanCommandRun> CanRun(PointInTime currentTime)
|
||||
{
|
||||
//TODO
|
||||
return Task.FromResult(CanCommandRun.True);
|
||||
}
|
||||
|
||||
public Task<PointInTime> SimulateCommand(PointInTime currentTime)
|
||||
public override Task<PointInTime> SimulateCommand(PointInTime currentTime)
|
||||
{
|
||||
//TODO
|
||||
return Task.FromResult(currentTime);
|
||||
@@ -38,8 +39,8 @@ public class DeleteCommand : IExecutableCommand
|
||||
|
||||
//Delete
|
||||
await TraverseTree(
|
||||
PointInTime.Present,
|
||||
ItemsToDelete,
|
||||
PointInTime.Present,
|
||||
ItemsToDelete,
|
||||
new Dictionary<string, IItemDeleter>(),
|
||||
new DeleteStrategy()
|
||||
);
|
||||
@@ -69,9 +70,9 @@ public class DeleteCommand : IExecutableCommand
|
||||
if (itemToDelete is IContainer container)
|
||||
{
|
||||
await TraverseTree(
|
||||
currentTime,
|
||||
(await container.Items.GetItemsAsync())?.Select(i => i.Path) ?? Enumerable.Empty<FullName>(),
|
||||
itemDeleters,
|
||||
currentTime,
|
||||
(await container.Items.GetItemsAsync())?.Select(i => i.Path) ?? Enumerable.Empty<FullName>(),
|
||||
itemDeleters,
|
||||
deleteStrategy
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user