// Create and return new type // Note: heading must have IsTuple=false to preserve order public static DataTypeCode Get(DataType type, DataColumn[] columns) { var dt = new DataTypeCode { Returns = type, Arguments = (columns == null) ? DataHeading.Empty : DataHeading.Create(columns, false), Flags = TypeFlags.Variable, }; //dt.NativeType = TypeMaker.CreateType(dt); // TODO: return(dt); }
// Create a new Code type for a particular heading public static DataTypeCode Create(string name, DataHeading heading, TypeFlags flags, ConvertDelegate converter = null, DefaultDelegate defaulter = null) { var dt = new DataTypeCode { Name = name, Heading = heading, Flags = flags, }; dt.NativeType = TypeMaker.CreateType(dt); return(dt); }