/// <summary>
        /// Gets a array of constructor arguments to build an object with
        /// </summary>
        /// <param name="dstore">The datastore.</param>
        /// <param name="parminfo">The parms for the constructor.</param>
        /// <param name="ti">The type info</param>
        /// <param name="row">The row in the result set to use</param>
        /// <param name="dt">The query result set</param>
        /// <returns></returns>
        public static object[] SetConstructorArguments(this IDataManager dstore, ParameterInfo[] parminfo, TypeInfo ti, int row, QueryData dt)
        {
            object[] toReturn = new object[parminfo.Length];
            for (int i = 0; i < parminfo.Length; i++)
            {
                ParameterInfo curr = parminfo[i];

                //most system classes are handled just nicely by the type converter, only interested in user defined classes
                if (dt.FieldHasMapping(ti.DataFields[i].FieldName) && curr.ParameterType.IsSystemType())
                    toReturn[i] = dstore.Connection.TypeConverter.ConvertToType(dt.GetDataForRowField(parminfo[i].Name, row), parminfo[i].ParameterType);
                else
                    toReturn[i] = BuildObject(dstore, dt, dstore.TypeInformationParser.GetTypeInfo(curr.ParameterType), row);
            }
            return toReturn;
        }