public static IFormatProvider GetFormatProvider(PropertyInfo propertyInfo)
{
var attribute = propertyInfo.GetCustomAttribute<SettingPropertyAttribute>();
if (null != attribute && null != attribute.CultureName)
{
return CultureInfo.GetCultureInfo(attribute.CultureName);
}
return CultureInfo.InvariantCulture;
}