Add extended force tuple result
This commit is contained in:
13
StructureHelperCommon/Models/States/IStateCalcTermPair.cs
Normal file
13
StructureHelperCommon/Models/States/IStateCalcTermPair.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements pair of limit state and calculeation term
|
||||
/// </summary>
|
||||
public interface IStateCalcTermPair
|
||||
{
|
||||
LimitStates LimitState { get; set; }
|
||||
CalcTerms CalcTerm { get; set; }
|
||||
}
|
||||
}
|
||||
13
StructureHelperCommon/Models/States/StateCalcTermPair.cs
Normal file
13
StructureHelperCommon/Models/States/StateCalcTermPair.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class StateCalcTermPair : IStateCalcTermPair
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public LimitStates LimitState { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.States
|
||||
{
|
||||
public class StateCalcTermPairUpdateStrategy : IUpdateStrategy<IStateCalcTermPair>
|
||||
{
|
||||
public void Update(IStateCalcTermPair targetObject, IStateCalcTermPair sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.LimitState = sourceObject.LimitState;
|
||||
targetObject.CalcTerm = sourceObject.CalcTerm;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user