Add VisualAnalysisDTO

This commit is contained in:
Evgeny Redikultsev
2024-09-14 19:03:35 +05:00
parent 5a9e7c3c4f
commit c10d6eb94e
84 changed files with 958 additions and 410 deletions

View File

@@ -0,0 +1,30 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Projects;
namespace DataAccess.DTOs
{
public class FileVersionFromDTOConvertStrategy : IConvertStrategy<FileVersion, FileVersionDTO>
{
private IUpdateStrategy<IFileVersion> updateStrategy;
public IShiftTraceLogger TraceLogger { get; set; }
public Dictionary<(Guid id, Type type), ISaveable> ReferenceDictionary { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public FileVersionFromDTOConvertStrategy(IUpdateStrategy<IFileVersion> updateStrategy)
{
this.updateStrategy = updateStrategy;
}
public FileVersionFromDTOConvertStrategy() : this(new FileVersionUpdateStrategy())
{
}
public FileVersion Convert(FileVersionDTO source)
{
FileVersion fileVersion = new(source.Id);
updateStrategy.Update(fileVersion, source);
return fileVersion;
}
}
}