Exemplo n.º 1
0
        /// <summary>
        /// Gets the configuration value by specific key.
        /// </summary>
        /// <param name="key">The configuration key.</param>
        /// <returns>
        /// The configuration value.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// Thrown if the given key is null.
        /// </exception>
        /// /// <exception cref="ArgumentException">
        /// Thrown if the given key is empty or white space.
        /// </exception>
        public string GetValue(
            string key,
            ConfigType configType = ConfigType.GlobalSettings)
        {
            CheckUtility.NotNullNorEmptyNorWhiteSpace(nameof(key), key);
            CheckUtility.IsDefinedEnumValue(nameof(configType), configType);

            return(this.configProvider.GetValue(key, configType));
        }