コード例 #1
0
 public static T AsInverseFor <T>(this T inverseCommand, SimulationChangeCommandBase originalCommand) where T : SimulationChangeCommandBase
 {
     CommandExtensions.AsInverseFor(inverseCommand, originalCommand);
     inverseCommand.WasChanged = originalCommand.WasChanged;
     inverseCommand.Increment  = !originalCommand.Increment;
     return(inverseCommand);
 }
コード例 #2
0
        protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
        {
            var inverseCommand = CommandExtensions.AsInverseFor(new ChangeMoleculeNameAtMoleculeDependentBuilderCommand(OldMoleculeName, NewMoleculeName, _moleculeDependentBuilder, _buildingBlock), this);

            inverseCommand.Visible = Visible;
            return(inverseCommand);
        }
コード例 #3
0
 public static T AsInverseFor <T>(this T inverseCommand, IBuildingBlockChangeCommand originalCommand) where T : IBuildingBlockChangeCommand
 {
     CommandExtensions.AsInverseFor(inverseCommand, originalCommand);
     inverseCommand.IncrementVersion = !originalCommand.IncrementVersion;
     inverseCommand.UpdateInternalFrom(originalCommand);
     return(inverseCommand);
 }
コード例 #4
0
 protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(CommandExtensions.AsInverseFor(new RenameObjectBaseCommand(_objectBase, OldName, _buildingBlock), this));
 }
 public static BuildingBlockChangeCommandBase <T> AsInverseFor <T>(this BuildingBlockChangeCommandBase <T> inverseCommand, BuildingBlockChangeCommandBase <T> originalCommand) where T : class, IBuildingBlock
 {
     CommandExtensions.AsInverseFor(inverseCommand, originalCommand);
     inverseCommand.ShouldIncrementVersion = !originalCommand.ShouldIncrementVersion;
     return(inverseCommand);
 }
コード例 #6
0
 protected override IReversibleCommand <IMoBiContext> GetInverseCommand(IMoBiContext context)
 {
     return(CommandExtensions.AsInverseFor(new ChangeVariableNameCommand(_changedFormula, OldVariableName, NewVariableName, _buildingBlock), this));
 }