17 lines
657 B
C#
17 lines
657 B
C#
using StructureHelperCommon.Infrastructures.Interfaces;
|
|
using StructureHelperCommon.Services;
|
|
|
|
namespace StructureHelperCommon.Models.Forces.Logics
|
|
{
|
|
public class HasForceCombinationUpdateStrategy : IUpdateStrategy<IHasForceActions>
|
|
{
|
|
public void Update(IHasForceActions targetObject, IHasForceActions sourceObject)
|
|
{
|
|
CheckObject.ThrowIfNull(targetObject, sourceObject, "Interface IHasForceCombination");
|
|
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
|
targetObject.ForceActions.Clear();
|
|
targetObject.ForceActions.AddRange(sourceObject.ForceActions);
|
|
}
|
|
}
|
|
}
|