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); }
private void validateDimensions(IModel model) { _dimensionValidator.Validate(model, _buildConfiguration) .SecureContinueWith(t => showWarnings(t.Result)); }