private string GetStringValue(IConfigValueConverter converter, object propertyInfoValue, PropertyInfo propertyInfo) { string strValue; if (converter != null) { strValue = converter.ConvertTo(propertyInfo, propertyInfoValue); } else { if (propertyInfoValue == null) { strValue = string.Empty; } else { if (propertyInfoValue is string) { strValue = (string)propertyInfoValue; } else { strValue = propertyInfoValue.ToString(); } } } return(strValue); }