Logic for interaction diagram was added

This commit is contained in:
Evgeny Redikultsev
2023-12-09 22:05:02 +05:00
parent f46c0dd814
commit e6a9322a36
30 changed files with 643 additions and 106 deletions

View File

@@ -0,0 +1,43 @@
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;
//Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
//All rights reserved.
namespace StructureHelperCommon.Models.Shapes
{
/// <inheritdoc/>
public class Point3D : IPoint3D
{
private readonly IUpdateStrategy<IPoint3D> updateStrategy = new Point3DUpdateStrategy();
/// <inheritdoc/>
public Guid Id { get; }
/// <inheritdoc/>
public double X { get; set; }
/// <inheritdoc/>
public double Y { get; set; }
/// <inheritdoc/>
public double Z { get; set; }
public Point3D(Guid id)
{
Id = id;
}
public Point3D() : this(Guid.NewGuid()) { }
public object Clone()
{
var newItem = new Point3D();
updateStrategy.Update(newItem, this);
return newItem;
}
}
}