Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckNotAllowNull()

void System.Data.DataColumn.CheckNotAllowNull ( )
inlinepackage

Definition at line 1271 of file DataColumn.cs.

1272 {
1273 if (_storage == null)
1274 {
1275 return;
1276 }
1277 if (_sortIndex != null)
1278 {
1280 {
1281 return;
1282 }
1283 throw ExceptionBuilder.NullKeyValues(ColumnName);
1284 }
1285 foreach (DataRow row in _table.Rows)
1286 {
1287 if (row.RowState == DataRowState.Deleted)
1288 {
1289 continue;
1290 }
1292 {
1293 if (row[this] == DBNull.Value)
1294 {
1295 throw ExceptionBuilder.NullKeyValues(ColumnName);
1296 }
1297 }
1298 else if (DataStorage.IsObjectNull(row[this]))
1299 {
1300 throw ExceptionBuilder.NullKeyValues(ColumnName);
1301 }
1302 }
1303 }
static bool IsObjectNull(object value)
DataRowCollection Rows
Definition DataTable.cs:701
bool IsKeyInIndex(object key)
Definition Index.cs:713

References System.Data.DataColumn._implementsINullable, System.Data.Common.DataStorage._nullValue, System.Data.DataColumn._sortIndex, System.Data.DataColumn._storage, System.Data.DataColumn._table, System.Data.DataColumn.ColumnName, System.Data.Index.IsKeyInIndex(), System.Data.Common.DataStorage.IsObjectNull(), System.Data.ExceptionBuilder.NullKeyValues(), System.Data.DataTable.Rows, and System.DBNull.Value.