Ejemplo n.º 1
0
        public void SetSolverPropertyValue(ISolverOptionDTO solverOptionDTO, string newValue, string oldValue)
        {
            //always convert the value to the actual property type
            var oldValueToUse = _context.DeserializeValueTo(solverOptionDTO.Type, oldValue);
            var newValueToUse = _context.DeserializeValueTo(solverOptionDTO.Type, newValue);

            AddCommand(createEditCommandFor(solverOptionDTO.Name, newValueToUse, oldValueToUse).Run(_context));
        }
        public override void RestoreExecutionData(IMoBiContext context)
        {
            base.RestoreExecutionData(context);
            _objectToUpdate = RestoreObjectToUpdate(context);
            var changeProperty = GetProperty();
            var propertyType   = changeProperty.PropertyType;

            _oldValue = context.DeserializeValueTo(propertyType, OldValueSerializationString);
            _newValue = context.DeserializeValueTo(propertyType, NewValueSerializationString);
        }