private bool Validate(GigyaDsSettings settings) { var coreSettingsHelper = new Gigya.Module.Connector.Helpers.GigyaSettingsHelper(); var coreSettings = coreSettingsHelper.Get(settings.SiteId, true); var dsHelper = new GigyaDsHelper(coreSettings, Logger, settings); var errorMessage = dsHelper.Validate(); if (!string.IsNullOrEmpty(errorMessage)) { Logger.Error(errorMessage); throw new ArgumentException(errorMessage); } return(true); }
private bool Validate(GigyaDsSettings settings, ref GigyaDsSettingsResponseModel responseModel) { var coreSettingsHelper = new GigyaSettingsHelper(); var coreSettings = coreSettingsHelper.Get(settings.SiteId, true); var dsHelper = new GigyaDsHelper(coreSettings, _logger, settings); var errorMessage = dsHelper.Validate(); if (!string.IsNullOrEmpty(errorMessage)) { responseModel.Error = errorMessage; _logger.Error(responseModel.Error); return(false); } return(true); }