Add converting primitives and calculators

This commit is contained in:
Evgeny Redikultsev
2024-11-04 17:40:18 +05:00
parent 7ea82c9492
commit 0bf9cf6a0b
53 changed files with 854 additions and 71 deletions

View File

@@ -15,6 +15,8 @@ namespace StructureHelperCommon.Infrastructures.Interfaces
public Dictionary<(Guid id, Type type), ISaveable> ReferenceDictionary { get; set; }
public IShiftTraceLogger TraceLogger { get; set; }
public T NewItem { get; set; }
public virtual T Convert(V source)
{
try

View File

@@ -3,7 +3,7 @@ using StructureHelperCommon.Models.Forces;
namespace StructureHelperCommon.Infrastructures.Interfaces
{
public interface IHasForceCombinations
public interface IHasForceActions
{
/// <summary>
/// Collection of force actions

View File

@@ -8,9 +8,9 @@ using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Forces.Logics
{
public class HasForceCombinationUpdateStrategy : IUpdateStrategy<IHasForceCombinations>
public class HasForceCombinationUpdateStrategy : IUpdateStrategy<IHasForceActions>
{
public void Update(IHasForceCombinations targetObject, IHasForceCombinations sourceObject)
public void Update(IHasForceActions targetObject, IHasForceActions sourceObject)
{
CheckObject.IsNull(targetObject, sourceObject, "Interface IHasForceCombination");
if (ReferenceEquals(targetObject, sourceObject)) { return; }

View File

@@ -12,7 +12,6 @@ namespace StructureHelperCommon.Models.Projects
{
string FullFileName { get; set; }
string FileName { get; }
bool IsNewFile { get; set; }
bool IsActual { get; set; }
List<IVisualAnalysis> VisualAnalyses { get;}
}

View File

@@ -15,7 +15,6 @@ namespace StructureHelperCommon.Models.Projects
public string FullFileName { get; set; } = string.Empty;
public bool IsActual { get; set; } = true;
public List<IVisualAnalysis> VisualAnalyses { get; } = new();
public bool IsNewFile { get; set; } = true;
public string FileName => Path.GetFileName(FullFileName);
public Project(Guid id)