Fix error of cross-section cloning strategy
This commit is contained in:
@@ -9,7 +9,7 @@ namespace StructureHelperLogics.Models.CrossSections
|
||||
{
|
||||
public class CrossSection : ICrossSection
|
||||
{
|
||||
private ICloneStrategy<ICrossSection> cloneStrategy = new CrossSectionCloneStrategy();
|
||||
private ICloneStrategy<ICrossSection> cloneStrategy;
|
||||
private IUpdateStrategy<ICrossSection> updateStrategy = new CrossSectionUpdateStrategy();
|
||||
public ICrossSectionRepository SectionRepository { get; set; } = new CrossSectionRepository();
|
||||
|
||||
@@ -27,9 +27,7 @@ namespace StructureHelperLogics.Models.CrossSections
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
//var newItem = new CrossSection();
|
||||
//updateStrategy.Update(newItem, this);
|
||||
//return newItem;
|
||||
cloneStrategy = new CrossSectionCloneStrategy();
|
||||
return cloneStrategy.GetClone(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user