Add version processor window

This commit is contained in:
Evgeny Redikultsev
2024-11-23 20:42:21 +05:00
parent 6ec68c6f49
commit 32243f5448
50 changed files with 1018 additions and 158 deletions

View File

@@ -0,0 +1,30 @@
using StructureHelperCommon.Infrastructures.Interfaces;
namespace StructureHelperLogics.Models.CrossSections
{
public class CrossSectionCloneStrategy : ICloneStrategy<ICrossSection>
{
private ICloneStrategy<ICrossSectionRepository> repositoryCloneStrategy;
private CrossSection targetObject;
public CrossSectionCloneStrategy(ICloneStrategy<ICrossSectionRepository> repositoryCloneStrategy)
{
this.repositoryCloneStrategy = repositoryCloneStrategy;
}
public CrossSectionCloneStrategy() : this (new CrossSectionRepositoryCloneStrategy())
{
}
public ICrossSection GetClone(ICrossSection sourceObject)
{
ICrossSectionRepository newRepository = repositoryCloneStrategy.GetClone(sourceObject.SectionRepository);
targetObject = new()
{
SectionRepository = newRepository
};
return targetObject;
}
}
}