first commit
This commit is contained in:
51
DCIT.Core/Models/BatchExecutionModels.cs
Normal file
51
DCIT.Core/Models/BatchExecutionModels.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DCIT.Core.Models
|
||||
{
|
||||
public enum BatchExecutionSkipReason
|
||||
{
|
||||
DuplicateSourcePath = 0,
|
||||
DuplicateOutputPath = 1,
|
||||
DuplicateDiffPath = 2
|
||||
}
|
||||
|
||||
public sealed class BatchExecutionSkipItem
|
||||
{
|
||||
public FileScanItem Item { get; set; }
|
||||
|
||||
public BatchExecutionSkipReason Reason { get; set; }
|
||||
|
||||
public string ConflictingPath { get; set; }
|
||||
|
||||
public string ExistingPath { get; set; }
|
||||
|
||||
public string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Reason)
|
||||
{
|
||||
case BatchExecutionSkipReason.DuplicateSourcePath:
|
||||
return "源文件与批次中已有任务重复,已跳过。";
|
||||
case BatchExecutionSkipReason.DuplicateOutputPath:
|
||||
return "输出目标与批次中已有任务冲突,已跳过。";
|
||||
case BatchExecutionSkipReason.DuplicateDiffPath:
|
||||
return "差异文件目标与批次中已有任务冲突,已跳过。";
|
||||
default:
|
||||
return "批处理任务冲突,已跳过。";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class BatchExecutionPlan
|
||||
{
|
||||
public IList<FileScanItem> ExecutionItems { get; set; } = new List<FileScanItem>();
|
||||
|
||||
public IList<BatchExecutionSkipItem> SkippedItems { get; set; } = new List<BatchExecutionSkipItem>();
|
||||
|
||||
public int DegreeOfParallelism { get; set; } = 1;
|
||||
|
||||
public bool RequiresSerialExecution { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user