New reactive core WIP
This commit is contained in:
@@ -140,12 +140,12 @@ public class CopyCommand : CommandBase, ITransportationCommand
|
||||
|
||||
if (item is IContainer container)
|
||||
{
|
||||
if (resolvedTarget.ItemsCollection.All(i => i.Path.GetName() != item.Name))
|
||||
if (resolvedTarget.Items.All(i => i.Path.GetName() != item.Name))
|
||||
{
|
||||
await copyOperation.CreateContainerAsync(resolvedTarget, container.Name, container.PointInTime);
|
||||
}
|
||||
|
||||
var children = container.ItemsCollection;
|
||||
var children = container.Items;
|
||||
|
||||
await TraverseTree(currentTime, children.Select(c => c.Path).ToList(), target.GetChild(item.Name, AbsolutePathType.Container), transportMode, copyOperation);
|
||||
await copyOperation.ContainerCopyDoneAsync(new AbsolutePath(_timelessContentProvider, container));
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class CreateItemBase : CommandBase, IExecutableCommand, IInitabl
|
||||
var parent = await ResolveParentAsync();
|
||||
if (parent is not IContainer parentContainer) return CanCommandRun.False;
|
||||
|
||||
var items = parentContainer.ItemsCollection;
|
||||
var items = parentContainer.Items;
|
||||
var existingItem = items.FirstOrDefault(i => i.Path.GetName() == NewItemName);
|
||||
|
||||
return existingItem switch
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DeleteCommand : CommandBase, IExecutableCommand
|
||||
{
|
||||
await TraverseTree(
|
||||
currentTime,
|
||||
container.ItemsCollection.Select(i => i.Path),
|
||||
container.Items.Select(i => i.Path),
|
||||
itemDeleters,
|
||||
deleteStrategy
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ public static class Helper
|
||||
public static async Task<string?> GetNewNameAsync(IContainer resolvedTarget, string name, TransportMode transportMode)
|
||||
{
|
||||
await resolvedTarget.WaitForLoaded();
|
||||
var items = resolvedTarget.ItemsCollection.ToList();
|
||||
var items = resolvedTarget.Items.ToList();
|
||||
var newName = name;
|
||||
var targetNameExists = items.Any(i => i.Path.GetName() == newName);
|
||||
if (transportMode == TransportMode.Merge)
|
||||
|
||||
Reference in New Issue
Block a user