public static object ConvertValueToType(object foundValue, string csvHeaderText)
{
if (csvHeaderText.Contains("("))
{
// We should use whatever logic Glue uses here....and we should probably cache it so that it's fast
string typeToConvertTo = CsvHeader.GetClassNameFromHeader(csvHeaderText);
Type type = TypeManager.GetTypeFromString(typeToConvertTo);
return PropertyValuePair.ConvertStringToType((string)foundValue, type);
}
else
{
return foundValue;
}
}