Analisys manager window was added
This commit is contained in:
@@ -10,11 +10,19 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class FactorCombinationUpdateStrategy : IUpdateStrategy<IForceCombinationByFactor>
|
||||
{
|
||||
readonly IUpdateStrategy<IForceTuple> tupleUpdateStrategy = new ForceTupleUpdateStrategy();
|
||||
private IUpdateStrategy<IForceTuple> tupleUpdateStrategy;
|
||||
public FactorCombinationUpdateStrategy(IUpdateStrategy<IForceTuple> tupleUpdateStrategy)
|
||||
{
|
||||
this.tupleUpdateStrategy = tupleUpdateStrategy;
|
||||
}
|
||||
public FactorCombinationUpdateStrategy() : this(new ForceTupleUpdateStrategy())
|
||||
{
|
||||
|
||||
}
|
||||
public void Update(IForceCombinationByFactor targetObject, IForceCombinationByFactor sourceObject)
|
||||
{
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
CheckObject.CompareTypes(targetObject, sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
tupleUpdateStrategy.Update(targetObject.FullSLSForces, sourceObject.FullSLSForces);
|
||||
targetObject.ULSFactor = sourceObject.ULSFactor;
|
||||
targetObject.LongTermFactor = sourceObject.LongTermFactor;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace StructureHelperCommon.Services
|
||||
public static void CompareTypes(object targetObject, object sourceObject)
|
||||
{
|
||||
IsNull(targetObject, "target object");
|
||||
IsNull(targetObject, "source object");
|
||||
IsNull(sourceObject, "source object");
|
||||
if (targetObject.GetType() != sourceObject.GetType())
|
||||
{
|
||||
throw new StructureHelperException
|
||||
@@ -34,7 +34,10 @@ namespace StructureHelperCommon.Services
|
||||
}
|
||||
public static void IsNull(object item, string message = "")
|
||||
{
|
||||
if (item is null) { throw new StructureHelperException(ErrorStrings.ParameterIsNull + message); }
|
||||
if (item is null)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ParameterIsNull + ": "+ message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckType(object sourceObject, Type targetType)
|
||||
|
||||
Reference in New Issue
Block a user