Ejemplo n.º 1
0
        private IModel createModelAndValidate(string modelName, IMoBiBuildConfiguration buildConfigurationReferencingTemplate)
        {
            var results = _modelConstructor.CreateModelFrom(buildConfigurationReferencingTemplate, modelName);

            if (results != null)
            {
                showWarnings(results.ValidationResult);
            }

            if (results == null || results.IsInvalid)
            {
                throw new MoBiException(AppConstants.Exceptions.CouldNotCreateSimulation);
            }

            var model = results.Model;

            _dimensionValidator.Validate(model, buildConfigurationReferencingTemplate)
            .SecureContinueWith(t => showWarnings(t.Result));

            return(model);
        }
Ejemplo n.º 2
0
 private void validateDimensions(IModel model)
 {
     _dimensionValidator.Validate(model, _buildConfiguration)
     .SecureContinueWith(t => showWarnings(t.Result));
 }