public void GenerateDefaultParametersIfNotConfigured() { // if not configured, a random string will be generated as date shift key, others will keep their default values if (ParameterConfiguration == null) { ParameterConfiguration = new ParameterConfiguration { DateShiftKey = Guid.NewGuid().ToString("N"), CryptoHashKey = s_defaultCryptoKey.Value, EncryptKey = s_defaultCryptoKey.Value, PresidioAnalyzerUrl = s_defaultPresidioAnalyzerUrl, PresidioAnonymizerUrl = s_defaultPresidioAnonymizerUrl, PresidioAnalyzedLanguage = s_defaultPresidioAnalyzedLanguage }; return; } if (string.IsNullOrEmpty(ParameterConfiguration.DateShiftKey)) { ParameterConfiguration.DateShiftKey = Guid.NewGuid().ToString("N"); } if (string.IsNullOrEmpty(ParameterConfiguration.CryptoHashKey)) { ParameterConfiguration.CryptoHashKey = s_defaultCryptoKey.Value; } if (string.IsNullOrEmpty(ParameterConfiguration.EncryptKey)) { ParameterConfiguration.EncryptKey = s_defaultCryptoKey.Value; } // if presidio endpoints are not configured, default endpoints will be used if (string.IsNullOrEmpty(ParameterConfiguration.PresidioAnalyzerUrl)) { ParameterConfiguration.PresidioAnalyzerUrl = s_defaultPresidioAnalyzerUrl; } if (string.IsNullOrEmpty(ParameterConfiguration.PresidioAnonymizerUrl)) { ParameterConfiguration.PresidioAnonymizerUrl = s_defaultPresidioAnonymizerUrl; } }