CopyCommandFactory, Copy status

This commit is contained in:
2023-07-01 22:04:00 +02:00
parent bd494526f5
commit 01fce38b7d
9 changed files with 111 additions and 42 deletions

View File

@@ -4,7 +4,7 @@ namespace FileTime.Core.Command;
public interface ITransportationCommand : ICommand
{
TransportMode? TransportMode { get; set; }
IList<FullName> Sources { get; }
FullName? Target { get; set; }
TransportMode TransportMode { get; }
IReadOnlyList<FullName> Sources { get; }
FullName Target { get; }
}

View File

@@ -0,0 +1,24 @@
using FileTime.Core.Models;
namespace FileTime.Core.Command;
public interface ITransportationCommandFactory
{
ITransportationCommand GenerateCommand(
IReadOnlyCollection<FullName> sources,
TransportMode mode,
FullName targetFullName);
}
public interface ITransportationCommandFactory<out T> : ITransportationCommandFactory where T : ITransportationCommand
{
new T GenerateCommand(IReadOnlyCollection<FullName> sources,
TransportMode mode,
FullName targetFullName);
ITransportationCommand ITransportationCommandFactory.GenerateCommand(
IReadOnlyCollection<FullName> sources,
TransportMode mode,
FullName targetFullName)
=> GenerateCommand(sources, mode, targetFullName);
}