Files
StructureHelper/StructureHelperCommon/Models/Shapes/Logics/LineShapeUpdateStrategy.cs
2023-07-16 17:21:28 +05:00

21 lines
703 B
C#

using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models.Shapes.Logics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Shapes
{
public class LineShapeUpdateStrategy : IUpdateStrategy<ILineShape>
{
readonly PointShapeUpdateStrategy pointUpdateStrategy = new();
public void Update(ILineShape targetObject, ILineShape sourceObject)
{
pointUpdateStrategy.Update(targetObject.StartPoint, sourceObject.StartPoint);
pointUpdateStrategy.Update(targetObject.EndPoint, sourceObject.EndPoint);
}
}
}