6 writes to DataType
System.Data (4)
fx\src\data\System\Data\DataColumn.cs (2)
253DataType = typeof(int); 1493clone.DataType = DataType;
fx\src\data\System\Data\DataTable.cs (1)
431dc.DataType = (Type) info.GetValue(String.Format(formatProvider, "DataTable.DataColumn_{0}.DataType", i), typeof(Type));
fx\src\data\System\Data\XMLSchema.cs (1)
254col.DataType = DataStorage.GetType(value);
System.Web.Entity (2)
System\Data\WebControls\EntityDataSourceViewSchema.cs (2)
108column.DataType = typeArguments[0]; 113column.DataType = propertyType;
131 references to DataType
System.Data (116)
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (4)
634SqlDbType dbType = InferSqlDbTypeFromType_Katmai(column.DataType); 636throw SQL.UnsupportedColumnTypeForSqlProvider(column.ColumnName, column.DataType.Name); 646if (column.DataType == typeof(SqlDecimal)) { 724column.DataType,
fx\src\data\System\Data\CodeGen\datacache.cs (33)
446Type DataType = index[i].DataType; 521findBy.Parameters.Add(ParameterDecl(GetTypeName(index[i].DataType), RowColumnPropertyName(index[i]))); 579TypeOf(GetTypeName(column.DataType)), 776Type DataType = col.DataType; 821if(col.DataType.IsSubclassOf(typeof(System.ValueType))) { 822errorList.Add(Res.GetString(Res.CodeGen_TypeCantBeNull, col.ColumnName, col.DataType.Name)); 827if(col.DataType == typeof(string)) { 828nullValueExpr = Property(TypeExpr(col.DataType), "Empty"); 833System.Reflection.ConstructorInfo ctor = col.DataType.GetConstructor(new Type[] {typeof(string)}); 835errorList.Add(Res.GetString(Res.CodeGen_NoCtor0, col.ColumnName, col.DataType.Name)); 840nullValueFieldInit = New(col.DataType, new CodeExpression[] {}); 849col.DataType == typeof(char) || col.DataType == typeof(string) || 850col.DataType == typeof(decimal)|| col.DataType == typeof(bool) || 851col.DataType == typeof(Single) || col.DataType == typeof(double) || 852col.DataType == typeof(SByte) || col.DataType == typeof(Byte) || 853col.DataType == typeof(Int16) || col.DataType == typeof(UInt16) || 854col.DataType == typeof(Int32) || col.DataType == typeof(UInt32) || 855col.DataType == typeof(Int64) || col.DataType == typeof(UInt64) 861if(col.DataType == typeof(Byte[])) { 863}else if(col.DataType == typeof(DateTime) || col.DataType == typeof(TimeSpan)) { 864nullValueFieldInit = MethodCall(TypeExpr(col.DataType), "Parse", Primitive(nullValueObj.ToString())); 867System.Reflection.ConstructorInfo ctor = col.DataType.GetConstructor(new Type[] {typeof(string)}); 869errorList.Add(Res.GetString(Res.CodeGen_NoCtor1, col.ColumnName, col.DataType.Name)); 874nullValueFieldInit = New(col.DataType, new CodeExpression[] {Primitive(nullValue)}); 883CodeMemberField nullValueField = FieldDecl(col.DataType, rowColumnName + "_nullValue"); {
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
992return DataMapping(Res.GetString(Res.ADP_ColumnSchemaMismatch, srcColumn, srcType.Name, column.ColumnName, column.DataType.Name));
fx\src\data\System\Data\Common\DataColumnMapping.cs (1)
118if ((null == dataType) || (dataType.IsArray == dataColumn.DataType.IsArray)) {
fx\src\data\System\Data\DataColumn.cs (13)
249if (!IsAutoIncrementType(DataType)) { 251throw ExceptionBuilder.AutoIncrementCannotSetIfHasData(DataType.Name); 273return (this.autoInc ?? (this.autoInc = ((this.DataType == typeof(System.Numerics.BigInteger)) 631if (DataType != typeof(DateTime) && value != DataSetDateTime.UnspecifiedLocal) { //Check for column being DateTime. If the column is not DateTime make sure the value that is being is only the default[UnspecifiedLocal]. 692if (newDefaultValue != DBNull.Value && DataType != typeof(Object)) { 695newDefaultValue = SqlConvert.ChangeTypeForDefaultValue(newDefaultValue, DataType, FormatProvider); 698throw ExceptionBuilder.DefaultValueColumnDataType(ColumnName, newDefaultValue.GetType(), DataType, ex); 952if ((DataType != typeof(string)) && (DataType != typeof(SqlString))) { 1164throw ExceptionBuilder.SetFailed(value, this, DataType, e); 1196throw ExceptionBuilder.SetFailed(value, this, DataType, e); 1493clone.DataType = DataType; 1577return DataStorage.IsTypeCustomType(DataType);
fx\src\data\System\Data\DataColumnPropertyDescriptor.cs (1)
57return column.DataType;
fx\src\data\System\Data\DataRelation.cs (4)
641if ((parentKey.ColumnsReference[i].DataType != childKey.ColumnsReference[i].DataType) || 642((parentKey.ColumnsReference[i].DataType == typeof(DateTime)) && 782if (col.DataType != typeof(int))
fx\src\data\System\Data\DataRow.cs (1)
1100throw ExceptionBuilder.UDTImplementsIChangeTrackingButnotIRevertible(dc.DataType.AssemblyQualifiedName);
fx\src\data\System\Data\DataTable.cs (3)
363info.AddValue(String.Format(formatProvider, "DataTable.DataColumn_{0}.DataType", i), Columns[i].DataType); 3550if (DataStorage.IsTypeCustomType(dc.DataType) && newValue != dc[record]) { 4377DataColumn foreignKey = new DataColumn(keyName, parentKey.DataType, null, MappingType.Hidden);
fx\src\data\System\Data\DataTableReader.cs (3)
454return (currentDataTable.Columns[ordinal].DataType); 682dr[DataType] = dc.DataType; 684if (dc.DataType == typeof(string)) {
fx\src\data\System\Data\ForeignKeyConstraint.cs (3)
560if (parentKey.ColumnsReference[i].DataType != childKey.ColumnsReference[i].DataType || 561((parentKey.ColumnsReference[i].DataType == typeof(DateTime)) && (parentKey.ColumnsReference[i].DateTimeMode != childKey.ColumnsReference[i].DateTimeMode) && ((parentKey.ColumnsReference[i].DateTimeMode & childKey.ColumnsReference[i].DateTimeMode) != DataSetDateTime.Unspecified)))
fx\src\data\System\Data\Merger.cs (3)
317if (dest.DataType != src.DataType || 318((dest.DataType == typeof(DateTime)) && (dest.DateTimeMode != src.DateTimeMode) && ((dest.DateTimeMode & src.DateTimeMode) != DataSetDateTime.Unspecified))) {
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (3)
88if ((null == populationMechanism) || (typeof(System.String) != populationMechanism.DataType)) { 92if ((null == collectionName) || (typeof(System.String) != collectionName.DataType)) { 98if ((null == restrictionCollectionName) || (typeof(System.String) != restrictionCollectionName.DataType)) {
fx\src\data\System\Data\ProviderBase\DbMetaDataFactory.cs (2)
229newDestinationColumn = new DataColumn(sourceColumn.ColumnName,sourceColumn.DataType); 252if ((null == collectionNameColumn) || (typeof(System.String) != collectionNameColumn.DataType)) {
fx\src\data\System\Data\ProviderBase\SchemaMapping.cs (4)
541if (typeof(System.Data.SqlTypes.SqlXml) == dataColumn.DataType) { 544else if (typeof(System.Xml.XmlDocument) == dataColumn.DataType) { 740if (typeof(System.Data.SqlTypes.SqlXml) == dataColumn.DataType) { 743else if (typeof(System.Xml.XmlDocument) == dataColumn.DataType) {
fx\src\data\System\Data\Select.cs (2)
580((isLConst && !isRConst && (leftType == StorageType.String) && (rightType == StorageType.Guid) && (null != (namedNode = expr.right as NameNode)) && (namedNode.column.DataType == typeof(Guid))) || 581(isRConst && !isLConst && (rightType == StorageType.String) && (leftType == StorageType.Guid) && (null != (namedNode = expr.left as NameNode)) && (namedNode.column.DataType == typeof(Guid))))
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (1)
1080t = _dataTableSource.Columns[sourceOrdinal].DataType;
fx\src\data\System\Data\XmlDataLoader.cs (1)
1107!( (column.DataType == typeof(Object)) || (typeName != null) || (xsiTypeString != null) );
fx\src\data\System\Data\XMLDiffLoader.cs (2)
357bool isPolymorphism = (column.DataType == typeof(Object)|| (row.GetAttribute(Keywords.MSD_INSTANCETYPE, Keywords.MSDNS) != null) || 402if (column.DataType == typeof(string))
fx\src\data\System\Data\xmlsaver.cs (31)
177string dt = XmlDataTypeName(col.DataType); 178if(bIsSqlType || (col.DataType == typeof(System.Numerics.BigInteger))) { 179root.SetAttribute(Keywords.MSD_DATATYPE, Keywords.MSDNS, col.DataType.FullName); 181else if ((dt.Length == 0) || bImplementsInullable || ((dt == Keywords.XSD_ANYTYPE) && (col.XmlDataType != Keywords.XSD_ANYTYPE))|| (col.DataType == typeof(DateTimeOffset))) { 187this.SetMSDataAttribute(root, col.DataType); 1116string typeName = XmlDataTypeName(col.DataType); // do not update the hashtable, as it will not write msdata:DataType 1118if (col.DataType == typeof(Guid) || col.DataType == typeof(Type) ) { 1123XmlTreeGen.ValidateColumnMapping(col.DataType); 1135if (col.DataType != typeof(String)) { 1136string dt = XmlDataTypeName(col.DataType); 1137if ((col.IsSqlType && ((dt.Length == 0) || col.ImplementsINullable)) || (typeof(SqlXml) == col.DataType) || col.DataType == typeof(DateTimeOffset) || col.DataType == typeof(System.Numerics.BigInteger)) { // no need to check if it is Sql typee if it already implements INullable, 1138root.SetAttribute(Keywords.MSD_DATATYPE, Keywords.MSDNS, col.DataType.FullName); 1146this.SetMSDataAttribute(root, col.DataType); 1172if (col.DataType == typeof(DateTime) && col.DateTimeMode != DataSetDateTime.UnspecifiedLocal) { 1234if (col.DataType == typeof(bool)) 1238XmlTreeGen.ValidateColumnMapping(col.DataType); 1245XmlTreeGen.ValidateColumnMapping(col.DataType); 1247if (col.DataType == typeof(bool)) { 1255if (col.DataType == typeof(bool)) { 1382if (col.DataType != typeof(int)) 1552string _typeName = XmlDataTypeName(col.DataType); 1606XmlTreeGen.ValidateColumnMapping(colTxt.DataType); 2253if (!startElementSkipped && columnValue.GetType() != col.DataType) { 2261if (columnValue.GetType() != col.DataType) { // throw if polymorphism; not supported 2573 XmlTreeGen.ValidateColumnMapping(col.DataType); 2586 XmlTreeGen.ValidateColumnMapping(col.DataType); 2626if (!startElementSkipped && valuesType != col.DataType) { // for polymorphism. 2633if (value.GetType() != col.DataType) { // throw if polymorphism; not supported
System.Data.DataSetExtensions (1)
System\Data\DataTableExtensions.cs (1)
166table.Columns.Add(column.ColumnName, column.DataType);
System.Web.DataVisualization (7)
Common\DataManager\DataPoint.cs (6)
1382 columnDataType = ((DataRow)enumerator.Current).Table.Columns[field].DataType; 1394columnDataType = ((DataRow)enumerator.Current).Table.Columns[columnIndex].DataType; 1411 columnDataType = ((DataRow)enumerator.Current).Table.Columns[0].DataType; 1424 columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[field].DataType; 1435columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[columnIndex].DataType; 1452 columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[0].DataType;
Common\General\Chart.cs (1)
568if (!usedForYValue || column.DataType != typeof(string))
System.Windows.Forms.DataVisualization (7)
Common\DataManager\DataPoint.cs (6)
1382 columnDataType = ((DataRow)enumerator.Current).Table.Columns[field].DataType; 1394columnDataType = ((DataRow)enumerator.Current).Table.Columns[columnIndex].DataType; 1411 columnDataType = ((DataRow)enumerator.Current).Table.Columns[0].DataType; 1424 columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[field].DataType; 1435columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[columnIndex].DataType; 1452 columnDataType = ((DataRowView)enumerator.Current).DataView.Table.Columns[0].DataType;
Common\General\Chart.cs (1)
568if (!usedForYValue || column.DataType != typeof(string))