GlueViewOfficialPlugins.Scripting.CsvParser.ConvertValueToType C# (CSharp) Method

ConvertValueToType() public static method

public static ConvertValueToType ( object foundValue, string csvHeaderText ) : object
foundValue object
csvHeaderText string
return object
        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;
            }
        }