-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* work in progress * update core
- Loading branch information
1 parent
c7ccd33
commit d7d51ce
Showing
19 changed files
with
107 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 14 additions & 34 deletions
48
src/MoBi.Presentation/Tasks/Interaction/InteractionTasksForExpressionProfileBuildingBlock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,35 @@ | ||
using MoBi.Core.Commands; | ||
using MoBi.Core.Domain.Services; | ||
using MoBi.Core.Domain.Services; | ||
using MoBi.Presentation.Tasks.Edit; | ||
using OSPSuite.Core.Commands.Core; | ||
using OSPSuite.Core.Domain.Builder; | ||
using OSPSuite.Core.Domain.Formulas; | ||
using OSPSuite.Core.Domain.UnitSystem; | ||
|
||
namespace MoBi.Presentation.Tasks.Interaction | ||
{ | ||
public interface IInteractionTasksForExpressionProfileBuildingBlock : IInteractionTasksForBuildingBlock<ExpressionProfileBuildingBlock>, IInteractionTaskForPathAndValueEntity<ExpressionProfileBuildingBlock, ExpressionParameter> | ||
public interface IInteractionTaskForIndividualBuildingBlock: IInteractionTasksForBuildingBlock<IndividualBuildingBlock>, IInteractionTaskForPathAndValueEntity<IndividualBuildingBlock, IndividualParameter> | ||
{ | ||
|
||
} | ||
|
||
public class InteractionTasksForExpressionProfileBuildingBlock : InteractionTaskForPathAndValueEntity<ExpressionProfileBuildingBlock, ExpressionParameter>, IInteractionTasksForExpressionProfileBuildingBlock | ||
public class InteractionTaskForIndividualBuildingBlock : InteractionTaskForPathAndValueEntity<IndividualBuildingBlock, IndividualParameter> | ||
{ | ||
public InteractionTasksForExpressionProfileBuildingBlock(IInteractionTaskContext interactionTaskContext, IEditTasksForBuildingBlock<ExpressionProfileBuildingBlock> editTask, IMoBiFormulaTask formulaTask) : | ||
base(interactionTaskContext, editTask, formulaTask) | ||
public InteractionTaskForIndividualBuildingBlock(IInteractionTaskContext interactionTaskContext, IEditTasksForBuildingBlock<IndividualBuildingBlock> editTask, IMoBiFormulaTask moBiFormulaTask) : base(interactionTaskContext, editTask, moBiFormulaTask) | ||
{ | ||
} | ||
|
||
public override IMoBiCommand Merge(ExpressionProfileBuildingBlock buildingBlockToMerge, ExpressionProfileBuildingBlock targetBuildingBlock) | ||
{ | ||
// TODO | ||
return new MoBiEmptyCommand(); | ||
} | ||
|
||
public override IMoBiCommand SetFormula(ExpressionProfileBuildingBlock buildingBlock, ExpressionParameter builder, IFormula formula) | ||
{ | ||
return SetFormula(buildingBlock, builder, formula, shouldClearValue:builder.Value.HasValue); | ||
} | ||
} | ||
|
||
protected override IMoBiMacroCommand GenerateAddCommandAndUpdateFormulaReferences(ExpressionParameter builder, ExpressionProfileBuildingBlock targetBuildingBlock, string originalBuilderName = null) | ||
{ | ||
// You cannot add ExpressionParameters to the buildingBlock | ||
return new MoBiMacroCommand(); | ||
} | ||
public interface IInteractionTasksForExpressionProfileBuildingBlock : IInteractionTasksForBuildingBlock<ExpressionProfileBuildingBlock>, IInteractionTaskForPathAndValueEntity<ExpressionProfileBuildingBlock, ExpressionParameter> | ||
{ | ||
|
||
} | ||
|
||
protected override double? ValueFromBuilder(ExpressionParameter builder) | ||
public class InteractionTasksForExpressionProfileBuildingBlock : InteractionTaskForPathAndValueEntity<ExpressionProfileBuildingBlock, ExpressionParameter>, IInteractionTasksForExpressionProfileBuildingBlock | ||
{ | ||
public InteractionTasksForExpressionProfileBuildingBlock(IInteractionTaskContext interactionTaskContext, IEditTasksForBuildingBlock<ExpressionProfileBuildingBlock> editTask, IMoBiFormulaTask formulaTask) : | ||
base(interactionTaskContext, editTask, formulaTask) | ||
{ | ||
return builder.Value; | ||
} | ||
|
||
public override IMoBiCommand ChangeValueFormulaCommand(ExpressionProfileBuildingBlock buildingBlock, ExpressionParameter builder, IFormula formula) | ||
{ | ||
return new ChangeValueFormulaCommand<ExpressionParameter>(buildingBlock, builder, formula, builder.Formula).Run(Context); | ||
} | ||
|
||
protected override IMoBiCommand SetValueWithUnit(ExpressionParameter builder, double? unitValueToBaseUnitValue, Unit unit, ExpressionProfileBuildingBlock startValues) | ||
{ | ||
return new PathAndValueEntityValueOrUnitChangedCommand<ExpressionParameter, ExpressionProfileBuildingBlock>(builder, unitValueToBaseUnitValue, unit, startValues).Run(Context); | ||
} | ||
} | ||
} |
Oops, something went wrong.