Add beam shear clone strategies

This commit is contained in:
Evgeny Redikultsev
2025-06-01 21:58:06 +05:00
parent 34ad25b2ea
commit 957ab62ece
28 changed files with 343 additions and 167 deletions

View File

@@ -1,25 +1,16 @@
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models.Calculators;
using StructureHelperCommon.Models.Forces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.Models.BeamShears
{
public class BeamShearRepository : IBeamShearRepository
{
private ICloneStrategy<IBeamShearRepository> cloneStrategy;
public Guid Id { get; }
public List<IBeamShearAction> Actions { get; } = new();
public List<ICalculator> Calculators { get; } = new();
public List<IBeamShearSection> Sections { get; } = new();
public List<IStirrup> Stirrups { get; } = new();
@@ -30,7 +21,10 @@ namespace StructureHelperLogics.Models.BeamShears
public object Clone()
{
throw new NotImplementedException();
var cloningStrategy = new DeepCloningStrategy();
cloneStrategy = new BeamShearRepositoryCloneStrategy(cloningStrategy);
var newItem = cloneStrategy.GetClone(this);
return newItem;
}
}
}