Beispiel #1
0
        protected virtual V GetPropertyValue <K, V>(IConfigurationSource source, PropertyConfig <K, V> propertyConfig)
        {
            V value = default(V);

            try
            {
                value = source.GetPropertyValue(propertyConfig);
            }
            catch (Exception e)
            {
                string message = string.Format(
                    "error occurred when getting property value, ignore the source. source: {0}, propertyConfig: {1}",
                    source, propertyConfig);
                Logger.Error(e, message);
            }

            return(value);
        }