468 references to Value
mscorlib (21)
system\convert.cs (2)
163
public static readonly Object DBNull = System.DBNull.
Value
;
185
if (value == System.DBNull.
Value
) return true;
system\defaultbinder.cs (2)
143
if (par[j].DefaultValue == System.DBNull.
Value
)
150
if (par[j].DefaultValue == System.DBNull.
Value
)
system\reflection\fieldinfo.cs (1)
925
if (value == DBNull.
Value
)
system\reflection\mdconstant.cs (3)
36
return DBNull.
Value
;
90
return DBNull.
Value
;
114
return DBNull.
Value
;
system\reflection\methodbase.cs (1)
354
if (p[i].DefaultValue == System.DBNull.
Value
)
system\reflection\parameterinfo.cs (5)
562
return (defaultValue != DBNull.
Value
);
580
if (defaultValue == DBNull.
Value
)
606
return DBNull.
Value
;
644
if (defaultValue == DBNull.
Value
)
686
if (defaultValue == DBNull.
Value
)
system\reflection\propertyinfo.cs (1)
475
if (defaultValue == DBNull.
Value
)
system\runtime\compilerservices\customconstantattribute.cs (1)
28
return DBNull.
Value
;
system\Runtime\InteropServices\Variant.cs (1)
259
case VarEnum.VT_NULL: return DBNull.
Value
;
system\unityserializationholder.cs (1)
237
return DBNull.
Value
;
system\variant.cs (3)
118
internal static readonly Variant DBNull = new Variant(Variant.CV_NULL, System.DBNull.
Value
, 0, 0);
293
if (obj == System.DBNull.
Value
) {
413
return System.DBNull.
Value
;
PresentationFramework (2)
src\Framework\System\Windows\Data\BindingExpression.cs (2)
1367
else if ((value == DBNull.
Value
) && (Converter == null || UseDefaultValueConverter))
1899
value = DBNull.
Value
;
System (25)
net\System\Net\_AutoWebProxyScriptHelper.cs (2)
450
if (gmt != null && gmt != DBNull.
Value
&& gmt != Missing.Value)
458
if (wd2 != null && wd2 != DBNull.
Value
&& gmt != Missing.Value)
net\System\Net\_LazyAsyncResult.cs (7)
77
m_Result = DBNull.
Value
;
90
GlobalLog.Assert(result != DBNull.
Value
, "LazyAsyncResult#{0}::.ctor()|Result can't be set to DBNull - it's a special internal value.", ValidationHelper.HashString(this));
289
return m_Result == DBNull.
Value
? null : m_Result;
300
GlobalLog.Assert(value != DBNull.
Value
, "LazyAsyncResult#{0}::set_Result()|Result can't be set to DBNull - it's a special internal value.", ValidationHelper.HashString(this));
337
if (result == DBNull.
Value
)
351
if (m_Result == DBNull.
Value
)
519
while (m_Result == DBNull.
Value
)
net\System\Net\HttpWebRequest.cs (11)
2109
object returnResult = Interlocked.Exchange(ref m_PendingReturnResult, DBNull.
Value
);
2123
else if (returnResult != null && returnResult != DBNull.
Value
)
2341
if (oldResult == DBNull.
Value
)
2362
if (oldResult == DBNull.
Value
)
3403
if (Async && _CoreResponse != null && (object)_CoreResponse != (object)DBNull.
Value
)
3509
_CoreResponse = DBNull.
Value
;
3528
object responseData = Async? Interlocked.CompareExchange(ref _CoreResponse, null, DBNull.
Value
): _CoreResponse;
3530
if (responseData == DBNull.
Value
)
3578
object responseData = Interlocked.CompareExchange(ref _CoreResponse, responseOrException, DBNull.
Value
);
3623
if (responseData == DBNull.
Value
)
4057
|| HttpWriteMode == HttpWriteMode.Buffer || m_PendingReturnResult == DBNull.
Value
|| m_OriginallyBuffered)
net\System\Net\ServicePoint.cs (1)
180
m_CachedChannelBinding = (binding != null ? (object)binding : (object)DBNull.
Value
);
net\System\Net\WebHeaderCollection.cs (4)
979
public WebHeaderCollection() : base(DBNull.
Value
)
983
internal WebHeaderCollection(WebHeaderCollectionType type) : base(DBNull.
Value
)
991
internal WebHeaderCollection(NameValueCollection cc): base(DBNull.
Value
)
1016
base(DBNull.
Value
)
System.Activities.DurableInstancing (43)
System\Activities\DurableInstancing\CreateWorkflowOwnerAsyncResult.cs (5)
90
parameters.Add(new SqlParameter { ParameterName = "@workflowHostType", SqlDbType = SqlDbType.UniqueIdentifier, Value = (base.Store.WorkflowHostType != Guid.Empty) ? base.Store.WorkflowHostType : (object) DBNull.
Value
});
93
parameters.Add(new SqlParameter { ParameterName = "@primitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[0].Count, Value = (object)(properties[0].Array) ?? DBNull.
Value
});
94
parameters.Add(new SqlParameter { ParameterName = "@complexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[1].Count, Value = (object)(properties[1].Array) ?? DBNull.
Value
});
95
parameters.Add(new SqlParameter { ParameterName = "@writeOnlyPrimitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[2].Count, Value = (object)(properties[2].Array) ?? DBNull.
Value
});
96
parameters.Add(new SqlParameter { ParameterName = "@writeOnlyComplexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[3].Count, Value = (object)(properties[3].Array) ?? DBNull.
Value
});
System\Activities\DurableInstancing\LoadWorkflowAsyncResult.cs (3)
71
parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = singleKeyToAssociate ? DBNull.
Value
: SerializationUtilities.CreateCorrelationKeyXmlBlob(keysToAssociate) });
73
parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Value = (object) concatenatedKeyProperties ?? DBNull.
Value
});
75
parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = singleKeyToAssociate ? keysToAssociate[0].KeyId : (object) DBNull.
Value
});
System\Activities\DurableInstancing\SaveWorkflowAsyncResult.cs (33)
78
parameters.Add(new SqlParameter { ParameterName = "@timerDurationMilliseconds", SqlDbType = SqlDbType.BigInt, Value = (object)GetPendingTimerExpiration(saveWorkflowCommand) ?? DBNull.
Value
});
81
parameters.Add(new SqlParameter { ParameterName = "@suspensionReason", SqlDbType = SqlDbType.NVarChar, Value = (object)suspensionReason ?? DBNull.
Value
});
82
parameters.Add(new SqlParameter { ParameterName = "@suspensionExceptionName", SqlDbType = SqlDbType.NVarChar, Size = 450, Value = (object)suspensionExceptionName ?? DBNull.
Value
});
85
parameters.Add(new SqlParameter { ParameterName = "@workflowHostType", SqlDbType = SqlDbType.UniqueIdentifier, Value = (object)GetWorkflowHostType(saveWorkflowCommand) ?? DBNull.
Value
});
92
parameters.Add(new SqlParameter { ParameterName = "@identityMetadata", SqlDbType = SqlDbType.Xml, Value = (object)identityMetadataXml ?? DBNull.
Value
});
193
object parameterValue = (parameterSize == -1 ? SaveWorkflowAsyncResult.GenerateByteArray(source) : source.Array) ?? (object)DBNull.
Value
;
437
parameters.Add(new SqlParameter { ParameterName = "@serviceName", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = serviceName ?? (object)DBNull.
Value
});
438
parameters.Add(new SqlParameter { ParameterName = "@serviceNamespace", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = serviceNamespace ?? (object)DBNull.
Value
});
439
parameters.Add(new SqlParameter { ParameterName = "@siteName", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = site ?? (object)DBNull.
Value
});
440
parameters.Add(new SqlParameter { ParameterName = "@relativeServicePath", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = relativeServicePath ?? (object)DBNull.
Value
});
441
parameters.Add(new SqlParameter { ParameterName = "@relativeApplicationPath", Size = -1, SqlDbType = SqlDbType.NVarChar, Value = relativeApplicationPath ?? (object)DBNull.
Value
});
445
parameters.Add(new SqlParameter { ParameterName = "@serviceDeploymentId", SqlDbType = SqlDbType.BigInt, Value = (this.serviceDeploymentId != 0) ? (object)this.serviceDeploymentId : (object)DBNull.
Value
});
479
parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = DBNull.
Value
});
480
parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = DBNull.
Value
});
481
parameters.Add(new SqlParameter { ParameterName = "@keysToComplete", SqlDbType = SqlDbType.Xml, Value = DBNull.
Value
});
482
parameters.Add(new SqlParameter { ParameterName = "@keysToFree", SqlDbType = SqlDbType.Xml, Value = DBNull.
Value
});
483
parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
484
parameters.Add(new SqlParameter { ParameterName = "@primitiveDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
485
parameters.Add(new SqlParameter { ParameterName = "@complexDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
486
parameters.Add(new SqlParameter { ParameterName = "@writeOnlyPrimitiveDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
487
parameters.Add(new SqlParameter { ParameterName = "@writeOnlyComplexDataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
488
parameters.Add(new SqlParameter { ParameterName = "@metadataProperties", SqlDbType = SqlDbType.VarBinary, Value = DBNull.
Value
});
489
parameters.Add(new SqlParameter { ParameterName = "@metadataIsConsistent", SqlDbType = SqlDbType.Bit, Value = DBNull.
Value
});
490
parameters.Add(new SqlParameter { ParameterName = "@encodingOption", SqlDbType = SqlDbType.TinyInt, Value = DBNull.
Value
});
491
parameters.Add(new SqlParameter { ParameterName = "@lastMachineRunOn", SqlDbType = SqlDbType.NVarChar, Value = DBNull.
Value
});
492
parameters.Add(new SqlParameter { ParameterName = "@executionStatus", SqlDbType = SqlDbType.NVarChar, Value = DBNull.
Value
});
493
parameters.Add(new SqlParameter { ParameterName = "@blockingBookmarks", SqlDbType = SqlDbType.NVarChar, Value = DBNull.
Value
});
507
parameters.Add(new SqlParameter { ParameterName = "@keysToAssociate", SqlDbType = SqlDbType.Xml, Value = singleKeyToAssociate ? DBNull.
Value
: SerializationUtilities.CreateCorrelationKeyXmlBlob(keysToAssociate) });
508
parameters.Add(new SqlParameter { ParameterName = "@singleKeyId", SqlDbType = SqlDbType.UniqueIdentifier, Value = singleKeyToAssociate ? keysToAssociate[0].KeyId : (object)DBNull.
Value
});
511
parameters.Add(new SqlParameter { ParameterName = "@concatenatedKeyProperties", SqlDbType = SqlDbType.VarBinary, Size = -1, Value = (object)concatenatedKeyProperties ?? DBNull.
Value
});
515
parameters.Add(new SqlParameter { ParameterName = "@executionStatus", SqlDbType = SqlDbType.NVarChar, Size = 450, Value = GetExecutionStatus(saveWorkflowCommand) ?? (object)DBNull.
Value
});
516
parameters.Add(new SqlParameter { ParameterName = "@blockingBookmarks", SqlDbType = SqlDbType.NVarChar, Size = -1, Value = GetBlockingBookmarks(saveWorkflowCommand) ?? (object)DBNull.
Value
});
564
parameters.Add(new SqlParameter() { SqlDbType = SqlDbType.Variant, ParameterName = argumentName, Value = propertyValue.Value ?? DBNull.
Value
});
System\Activities\DurableInstancing\SerializationUtilities.cs (1)
49
return DBNull.
Value
;
System\Activities\DurableInstancing\StoreUtilities.cs (1)
149
if ((sqlParameter.Value == DBNull.
Value
) || (sqlParameter.Value == null))
System.Data (238)
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (9)
197
else if ( DBNull.
Value
== value ) {
741
if (DBNull.
Value
!= temp) {
747
if (DBNull.
Value
== temp) {
792
if (DBNull.
Value
== temp) {
822
if (DBNull.
Value
== temp) {
852
if (DBNull.
Value
== temp) {
881
if (DBNull.
Value
== temp) {
889
if (DBNull.
Value
== temp) {
909
if (DBNull.
Value
== temp) {
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (8)
805
result = DBNull.
Value
;
843
result = DBNull.
Value
;
1107
DBNull.
Value
, // SqlDbType.Variant
1115
DBNull.
Value
, // SqlDbType.Date
1116
DBNull.
Value
, // SqlDbType.Time
1117
DBNull.
Value
, // SqlDbType.DateTime2
1118
DBNull.
Value
, // SqlDbType.DateTimeOffset
1140
result = DBNull.
Value
;
fx\src\data\System\Data\CodeGen\datacache.cs (1)
663
if (column.DefaultValue != DBNull.
Value
) {
fx\src\data\System\Data\Common\AdapterUtil.cs (2)
2503
if ((null == value) || (DBNull.
Value
== value)) {
2511
if ((value == null) || (value == DBNull.
Value
)) {
fx\src\data\System\Data\Common\DataStorage.cs (2)
135
: this(column, type, defaultValue, DBNull.
Value
, false, storageType) {
472
return ((null == value) || (DBNull.
Value
== value) || IsObjectSqlNull(value));
fx\src\data\System\Data\Common\ObjectStorage.cs (1)
30
: base(column, type, defaultValue, DBNull.
Value
, typeof(ICloneable).IsAssignableFrom(type), GetStorageType(type)) {
fx\src\data\System\Data\Common\SQLConvert.cs (21)
20
if ((value == DBNull.
Value
)) { // null is not valid, SqlByte is struct
38
if (value == DBNull.
Value
) {
59
if (value == DBNull.
Value
) {
87
if (value == DBNull.
Value
) {
120
if (value == DBNull.
Value
) {
168
if (value == DBNull.
Value
) {
210
if (value == DBNull.
Value
) {
254
if (value == DBNull.
Value
) {
295
if (value == DBNull.
Value
) {
313
if ((value == DBNull.
Value
) || (value == null)) {
331
if (value == DBNull.
Value
) {
349
if (value == DBNull.
Value
) {
367
if ((value == DBNull.
Value
) || (value == null)) {
385
if (value == DBNull.
Value
) {
400
if (value == DBNull.
Value
) {
419
if ((DBNull.
Value
== value) || (null == value)) { return DBNull.
Value
; }
469
if ((DBNull.
Value
== value) || (null == value)) {
470
return DBNull.
Value
;
707
if ((DBNull.
Value
== value) || (null == value)) {
708
return DBNull.
Value
;
fx\src\data\System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
74
if ((value == DBNull.
Value
) || (value == null)){
fx\src\data\System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
75
if ((value == DBNull.
Value
) || (value == null)){
fx\src\data\System\Data\Common\SQLTypes\SqlUDTStorage.cs (2)
81
if (DBNull.
Value
== value) { // it is not meaningful compare UDT with DBNull.Value WebData 113372
106
if (DBNull.
Value
== value) {
fx\src\data\System\Data\Common\SQLTypes\SqlXmlStorage.cs (1)
75
if ((value == DBNull.
Value
) || (value == null)){
fx\src\data\System\Data\DataColumn.cs (12)
41
internal object defaultValue = DBNull.
Value
; // DefaultValue Converter
670
if (defaultValue == DBNull.
Value
&& this.implementsINullable) { // for perf I dont access property
691
object newDefaultValue = (value == null) ? DBNull.
Value
: value;
692
if (newDefaultValue != DBNull.
Value
&& DataType != typeof(Object)) {
703
defaultValueIsNull = ((newDefaultValue == DBNull.
Value
) || (this.ImplementsINullable && DataStorage.IsObjectSqlNull(newDefaultValue))) ? true : false;
1407
if (dr[this] == DBNull.
Value
) {
1495
clone.defaultValueIsNull = ((defaultValue == DBNull.
Value
) || (clone.ImplementsINullable && DataStorage.IsObjectSqlNull(defaultValue))) ? true : false;
1540
return DBNull.
Value
;
1636
if (value != null && value != DBNull.
Value
&& ((string)value).Length > MaxLength) {
1662
DataRow[] rows = index.GetRows(index.FindRecords(DBNull.
Value
));
1726
Debug.Assert(value != null && (value != DBNull.
Value
), "Caller is resposible for checking on DBNull");
1732
Debug.Assert(value != null && (value != DBNull.
Value
), "Caller is resposible for checking on DBNull");
fx\src\data\System\Data\DataColumnPropertyDescriptor.cs (2)
76
return (dataRowView.GetColumnValue(column) != DBNull.
Value
);
87
dataRowView.SetColumnValue(column, DBNull.
Value
);// no need to ccheck for the col type and set Sql...Null!
fx\src\data\System\Data\DataRow.cs (8)
161
if ((DBNull.
Value
!= value) && ((IChangeTracking)value).IsChanged) {
306
proposed = DBNull.
Value
;
448
proposed = DBNull.
Value
;
499
if (DBNull.
Value
!= value) {
1098
if (DBNull.
Value
!= value){
1112
if (DBNull.
Value
!= value) {
1156
this[column] = DBNull.
Value
;
1242
parentKeyValues[0] = DBNull.
Value
;
fx\src\data\System\Data\DataTable.cs (1)
3158
row[c] = DBNull.
Value
;
fx\src\data\System\Data\DataTableReader.cs (1)
698
if (dc.DefaultValue != DBNull.
Value
)
fx\src\data\System\Data\DefaultValueTypeConverter.cs (2)
39
else if (value == DBNull.
Value
) {
53
return DBNull.
Value
;
fx\src\data\System\Data\Filter\BinaryNode.cs (41)
102
if (val == DBNull.
Value
) {
269
else if ((vLeft == DBNull.
Value
)||(vRight == DBNull.
Value
)) {
270
return DBNull.
Value
;
286
vLeft = vRight = DBNull.
Value
;
290
object value = DBNull.
Value
;
617
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) ||
618
(vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
619
return DBNull.
Value
;
623
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) ||
624
(vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
625
return DBNull.
Value
;
629
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) ||
630
(vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
631
return DBNull.
Value
;
635
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)) ||
636
(vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
637
return DBNull.
Value
;
641
if (((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) ||
642
((vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))))
643
return DBNull.
Value
;
647
if (((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))) ||
648
((vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight))))
649
return DBNull.
Value
;
654
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))){
661
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft))){
674
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)))
675
return DBNull.
Value
;
696
if ((vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight )))
697
return DBNull.
Value
;
722
if ((vLeft != DBNull.
Value
) && (!DataStorage.IsObjectSqlNull(vLeft))) {
736
if ((vRight == DBNull.
Value
)||(DataStorage.IsObjectSqlNull(vRight)))
739
if ((vLeft == DBNull.
Value
)||(DataStorage.IsObjectSqlNull(vLeft)))
826
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)))
827
return DBNull.
Value
;
839
if ((vRight == DBNull.
Value
)||(right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
1225
if ((vLeft == DBNull.
Value
)||(left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)))
1226
return DBNull.
Value
;
1235
if (vRight == DBNull.
Value
|| DataStorage.IsObjectSqlNull(vRight))
1236
return DBNull.
Value
;
1280
return DBNull.
Value
;
fx\src\data\System\Data\Filter\ConstNode.cs (1)
26
this.val = DBNull.
Value
;
fx\src\data\System\Data\Filter\DataExpression.cs (2)
115
if (result != DBNull.
Value
|| StorageType.Uri < _storageType) {
163
return DBNull.
Value
;
fx\src\data\System\Data\Filter\FunctionNode.cs (12)
125
if ((argumentValues[i] == DBNull.
Value
) || (typeof(object) == funcs[info].parameters[i])) {
128
return DBNull.
Value
;
308
return DBNull.
Value
;
349
return DBNull.
Value
;
389
return DBNull.
Value
;
404
return DBNull.
Value
;
417
if (argumentValues[0] == DBNull.
Value
) {
418
return DBNull.
Value
;
455
if (argumentValues[0] == DBNull.
Value
|| argumentValues[1] == DBNull.
Value
|| argumentValues[2] == DBNull.
Value
)
456
return DBNull.
Value
;
fx\src\data\System\Data\Filter\LookupNode.cs (1)
93
return DBNull.
Value
;
fx\src\data\System\Data\Filter\UnaryNode.cs (3)
46
object value = DBNull.
Value
;
49
return DBNull.
Value
;
111
value = DBNull.
Value
;
fx\src\data\System\Data\Filter\ZeroOpNode.cs (2)
38
return DBNull.
Value
;
41
return DBNull.
Value
;
fx\src\data\System\Data\ForeignKeyConstraint.cs (2)
306
proposedKey[i] = DBNull.
Value
;
417
proposedKey[i] = DBNull.
Value
;
fx\src\data\System\Data\Odbc\OdbcCommandBuilder.cs (2)
91
if (DBNull.
Value
!= bvalue) {
97
if (DBNull.
Value
!= bvalue) {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (1)
1572
this.dataCache[i] = DBNull.
Value
;
fx\src\data\System\Data\Odbc\odbcmetadatafactory.cs (10)
139
if (odbcSource != DBNull.
Value
){
152
return DBNull.
Value
;
333
if ((getTypeInfoValues[indexAUTO_UNIQUE_VALUE] == DBNull.
Value
) ||
344
if (getTypeInfoValues[indexNULLABLE] != DBNull.
Value
) {
357
dataTypesRow[isNullableColumn] = DBNull.
Value
;
362
if ( DBNull.
Value
!= getTypeInfoValues[indexSEARCHABLE]){
393
if (getTypeInfoValues[indexMAXIMUM_SCALE] != DBNull.
Value
) {
397
if (getTypeInfoValues[indexMINIMUM_SCALE] != DBNull.
Value
) {
401
if (getTypeInfoValues[indexLITERAL_PREFIX] != DBNull.
Value
) {
405
if (getTypeInfoValues[indexLITERAL_SUFFIX] != DBNull.
Value
) {
fx\src\data\System\Data\Odbc\OdbcParameter.cs (1)
842
Value = DBNull.
Value
;
fx\src\data\System\Data\OleDb\ColumnBinding.cs (2)
249
value = DBNull.
Value
;
390
value = DBNull.
Value
;
fx\src\data\System\Data\OleDb\OleDbCommandBuilder.cs (2)
86
if (DBNull.
Value
!= bvalue) {
92
if (DBNull.
Value
!= bvalue) {
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (1)
277
value[0] = DBNull.
Value
;
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (3)
413
newRow[isSearchable] = DBNull.
Value
;
414
newRow[isSearchableWithLike] = DBNull.
Value
;
415
if ( DBNull.
Value
!= sourceRow[searchable]){
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
410
if ((null != value) && (DBNull.
Value
!= value) && (typeof(object) != destinationType.dataType)) {
fx\src\data\System\Data\OleDb\RowBinding.cs (1)
184
return ((null != value) ? value : DBNull.
Value
);
fx\src\data\System\Data\ProviderBase\DbMetaDataFactory.cs (3)
160
restrictionParameter.Value = DBNull.
Value
;
499
if (version != DBNull.
Value
) {
513
if (version != DBNull.
Value
) {
fx\src\data\System\Data\ProviderBase\SchemaMapping.cs (6)
281
_readerDataValues[i] = DBNull.
Value
;
991
if (DBNull.
Value
!= value) {
999
if (DBNull.
Value
!= value) {
1007
if (DBNull.
Value
!= value) {
1015
if (DBNull.
Value
!= value) {
1023
if (DBNull.
Value
!= value) {
fx\src\data\System\Data\Select.cs (4)
549
if ((vLeft == DBNull.
Value
)||(expr.left.IsSqlColumn && DataStorage.IsObjectSqlNull(vLeft)))
551
if ((vRight == DBNull.
Value
)||(expr.right.IsSqlColumn && DataStorage.IsObjectSqlNull(vRight)))
592
case Operators.Is: c = (vLeft == DBNull.
Value
? 0 : -1); break;
593
case Operators.IsNot: c = (vLeft != DBNull.
Value
? 0 : 1); break;
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (6)
643
case StorageType.Empty: return DBNull.
Value
;
678
return DBNull.
Value
;
683
return DBNull.
Value
;
688
return DBNull.
Value
;
699
return DBNull.
Value
;
702
case StorageType.Empty: return DBNull.
Value
;
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (3)
847
return DBNull.
Value
;
902
isNull = ((value == null) || (value == DBNull.
Value
));
924
return DBNull.
Value
;
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
5222
data = DBNull.
Value
;
5835
if ((null != val) && (DBNull.
Value
!= val)) {
fx\src\data\System\Data\SqlClient\SqlCommandBuilder.cs (2)
174
if (DBNull.
Value
!= bvalue) {
180
if (DBNull.
Value
!= bvalue) {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
2245
return DBNull.
Value
;
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2588
return DBNull.
Value
;
fx\src\data\System\Data\SqlClient\SqlDependency.cs (1)
1172
if (value == null || value == DBNull.
Value
) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (8)
403
else if (sqlType == typeof(object)) return DBNull.
Value
;
404
else if (sqlType == typeof(IEnumerable<DbDataRecord>)) return DBNull.
Value
;
405
else if (sqlType == typeof(DataTable)) return DBNull.
Value
;
406
else if (sqlType == typeof(DateTime)) return DBNull.
Value
;
407
else if (sqlType == typeof(TimeSpan)) return DBNull.
Value
;
408
else if (sqlType == typeof(DateTimeOffset)) return DBNull.
Value
;
411
return DBNull.
Value
;
493
if ((null != comVal) && (DBNull.
Value
!= comVal)) {
fx\src\data\System\Data\SqlClient\sqlmetadatafactory.cs (14)
111
if (values[columnSizeIndex] != DBNull.
Value
) {
115
if (values[isFixedLengthIndex] != DBNull.
Value
) {
121
if (values[isNullableIndex] != DBNull.
Value
) {
125
if ((values[assemblyNameIndex] != DBNull.
Value
) &&
126
(values[assemblyClassIndex] != DBNull.
Value
) &&
127
(values[versionMajorIndex] != DBNull.
Value
) &&
128
(values[versionMinorIndex] != DBNull.
Value
) &&
129
(values[versionBuildIndex] != DBNull.
Value
) &&
130
(values[versionRevisionIndex] != DBNull.
Value
)) {
146
if (values[cultureInfoIndex] != DBNull.
Value
) {
151
if (values[publicKeyIndex] != DBNull.
Value
) {
223
if (values[columnSizeIndex] != DBNull.
Value
) {
229
if (values[isNullableIndex] != DBNull.
Value
) {
233
if (values[typeNameIndex] != DBNull.
Value
) {
fx\src\data\System\Data\SqlClient\SqlParameter.cs (5)
678
if (_value == DBNull.
Value
) {
764
_isNull = ((_value == null) || (_value == DBNull.
Value
) || ((_isSqlParameterSqlType) && (_valueAsINullable.IsNull)));
780
_isNull = ((_value == null) || (_value == DBNull.
Value
) || ((_isSqlParameterSqlType) && (_valueAsINullable.IsNull)));
1417
if (null != _value && DBNull.
Value
!= _value) {
1519
if (DBNull.
Value
== GetCoercedValue()) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (3)
5984
if ((null == value) || (DBNull.
Value
== value)) {
10514
Debug.Assert((null != value) && (DBNull.
Value
!= value), "unexpected missing or empty object");
10747
Debug.Assert((null != value) && (DBNull.
Value
!= value), "unexpected missing or empty object");
fx\src\data\System\Data\XmlDataLoader.cs (8)
359
row[column] = DBNull.
Value
;
387
row[c] = DBNull.
Value
;
433
row[c] = DBNull.
Value
;
785
foundColumns[i] = DBNull.
Value
; // Assign DBNull if possible
1009
c[row.tempRecord] = null != foundColumns[i] ? foundColumns[i] : DBNull.
Value
;
1035
foundColumns[i] = DBNull.
Value
; // Assign DBNull if possible
1120
columnValue = DBNull.
Value
; // change to DBNull;
1256
foundColumns[column.Ordinal] = DBNull.
Value
;
fx\src\data\System\Data\XMLDiffLoader.cs (1)
300
col[record] = DBNull.
Value
;
fx\src\data\System\Data\xmlsaver.cs (6)
2179
object val = (table.XmlText == null ? DBNull.
Value
: row[table.XmlText, DataRowVersion.Original]);
2250
if ((columnValue != DBNull.
Value
) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(columnValue))){
2572
if ((value != DBNull.
Value
) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value))){
2585
if ((value != DBNull.
Value
) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value))){
2600
if (((value == DBNull.
Value
) || (col.ImplementsINullable && DataStorage.IsObjectSqlNull(value))) && (col.ColumnMapping == MappingType.SimpleContent))
2604
if (((value != DBNull.
Value
) && (!col.ImplementsINullable || !DataStorage.IsObjectSqlNull(value)))&&(col.columnMapping != MappingType.Attribute)){
fx\src\data\System\NewXml\XPathNodePointer.cs (1)
370
if ( colVal == DBNull.
Value
)
System.Data.DataSetExtensions (10)
System\Data\DataRowComparer.cs (4)
34
if (Object.ReferenceEquals(a, null) || Object.ReferenceEquals(a, DBNull.
Value
) ||
35
Object.ReferenceEquals(b, null) || Object.ReferenceEquals(b, DBNull.
Value
))
48
if (Object.ReferenceEquals(a, null) || Object.ReferenceEquals(a, DBNull.
Value
) ||
49
Object.ReferenceEquals(b, null) || Object.ReferenceEquals(b, DBNull.
Value
))
System\Data\DataRowExtensions.cs (6)
161
row[columnIndex] = (object)value ?? DBNull.
Value
;
178
row[columnName] = (object)value ?? DBNull.
Value
;
195
row[column] = (object)value ?? DBNull.
Value
;
221
return ((DBNull.
Value
== value) ? default(T) : (T)value);
226
if (DBNull.
Value
== value)
235
if (DBNull.
Value
== value)
System.Data.Entity (43)
System\Data\Common\DataRecord.cs (1)
425
return (DBNull.
Value
== _values[ordinal]);
System\Data\Common\EntityUtil.cs (1)
1983
if ((null == value) || (DBNull.
Value
== value)) {
System\Data\Common\Internal\Materialization\RecordState.cs (1)
293
PendingColumnValues[i] = DBNull.
Value
;
System\Data\Common\Internal\Materialization\Translator.cs (1)
612
private static readonly Expression DBNull_Value = Expression.Constant(DBNull.
Value
, typeof(object));
System\Data\Common\Utils\ByValueEqualityComparer.cs (4)
128
Debug.Assert(!((object.ReferenceEquals(x, DBNull.
Value
)) && (object.ReferenceEquals(y,DBNull.
Value
))), "object.ReferenceEquals should catch the case when both values are dbnull");
129
if (object.ReferenceEquals(x, DBNull.
Value
))
133
if (object.ReferenceEquals(y, DBNull.
Value
))
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (1)
295
if (DBNull.
Value
.Equals(m_rowsAffectedParameter.Value))
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (1)
540
if (null == value || value == DBNull.
Value
|| value.GetType() == clrPrimitiveType)
System\Data\Mapping\Update\Internal\PropagatorResult.cs (2)
270
m_value = value ?? DBNull.
Value
;
292
return NullIdentifier == this.Identifier && DBNull.
Value
== m_value;
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (2)
513
value = value ?? DBNull.
Value
; // records expect DBNull rather than null
528
if (DBNull.
Value
.Equals(value))
System\Data\Objects\EntityEntry.cs (8)
1313
return ((StateManagerValue)retValue).originalValue ?? DBNull.
Value
;
1376
return retValue ?? DBNull.
Value
;
3018
if (newValue == null || newValue == DBNull.
Value
)
3289
object fieldValue = member.GetValue(value) ?? DBNull.
Value
;
3295
if (existing == DBNull.
Value
)
3299
else if (fieldValue != DBNull.
Value
)
3335
(((object)DBNull.
Value
== newFieldValue) ||
3336
((object)DBNull.
Value
== existing) ||
System\Data\Objects\Internal\ComplexTypeMaterializer.cs (2)
81
return ((DBNull.
Value
!= value) ? value : null);
86
return ((DBNull.
Value
!= record) ? CreateComplexRecursive((IExtendedDataRecord)record, existing) : existing);
System\Data\Objects\Internal\ForeignKeyFactory.cs (2)
105
return keyValue == DBNull.
Value
? null : new EntityKey(principalEntitySet, keyValue);
123
if (value == DBNull.
Value
)
System\Data\Objects\Internal\ObjectQueryExecutionPlan.cs (1)
183
entityCommand.Parameters[index].Value = parameter.Value ?? DBNull.
Value
;
System\Data\Objects\ObjectContext.cs (4)
2784
entityParameter.Value = objectParameter.Value ?? DBNull.
Value
;
2786
if (DBNull.
Value
== entityParameter.Value ||
3233
dbParameters[i].Value = parameters[i] ?? DBNull.
Value
;
3332
if (_entityParameter.Value != DBNull.
Value
&& _objectParameter.MappableType.IsEnum)
System\Data\Objects\ObjectStateEntryBaseUpdatableDataRecord.cs (2)
378
return (GetValue(ordinal) == DBNull.
Value
);
526
SetRecordValue(ordinal, DBNull.
Value
);
System\Data\Objects\ObjectStateEntryDbDataRecord.cs (1)
253
return (GetValue(ordinal) == DBNull.
Value
);
System\Data\Objects\ObjectStateEntryOriginalDbUpdatableDataRecord.cs (2)
88
object fieldValue = value ?? DBNull.
Value
;
107
if ((object)DBNull.
Value
== fieldValue &&
System\Data\Objects\ObjectStateManagerMetadata.cs (1)
129
if (DBNull.
Value
== value)
System\Data\Query\ResultAssembly\BridgeDataRecord.cs (3)
454
if (result != DBNull.
Value
) {
458
result = DBNull.
Value
;
639
bool result = (DBNull.
Value
== columnValue);
System\Data\SqlClient\SqlProviderServices.cs (3)
118
parameter = CreateSqlParameter(functionParameter.Name, functionParameter.TypeUsage, functionParameter.Mode, DBNull.
Value
, preventTruncation, sqlVersion);
132
parameter = CreateSqlParameter(queryParameter.Key, parameterType, ParameterMode.In, DBNull.
Value
, preventTruncation, sqlVersion);
414
value != DBNull.
Value
&&
System.Data.Linq (2)
SqlClient\SqlProvider.cs (1)
1854
if (parameterValue == DBNull.
Value
) parameterValue = null;
SqlClient\SqlTypeSystemProvider.cs (1)
1037
return DBNull.
Value
;
System.Data.Services (14)
System\Data\Services\Epm\EpmContentSerializer.cs (4)
173
currentValue = currentValue == DBNull.
Value
? null : currentValue;
180
currentValue = currentValue == DBNull.
Value
? null : currentValue;
198
currentValue = currentValue == DBNull.
Value
? null : currentValue;
232
Debug.Assert(currentValue != DBNull.
Value
, "currentValue != DBNull.Value -- we have converted DBNull to null");
System\Data\Services\Epm\EpmCustomContentWriterNodeData.cs (1)
215
if (propertyValue == null || propertyValue == DBNull.
Value
)
System\Data\Services\Serializers\JsonSerializer.cs (2)
702
if (propertyValue == null || propertyValue == DBNull.
Value
)
727
if (propertyValue == null || propertyValue == DBNull.
Value
)
System\Data\Services\Serializers\PlainXmlSerializer.cs (1)
313
if (value == null || value == DBNull.
Value
)
System\Data\Services\Serializers\Serializer.cs (2)
1194
if (value == DBNull.
Value
)
1240
if (value == DBNull.
Value
)
System\Data\Services\Serializers\SyndicationSerializer.cs (3)
884
if (value == null || value == DBNull.
Value
)
974
if (propertyValue == null || propertyValue == DBNull.
Value
)
993
if (propertyValue == DBNull.
Value
)
System\Data\Services\WebUtil.cs (1)
1500
if (result == DBNull.
Value
)
System.Management (10)
InteropClasses\WMIInterop.cs (1)
166
pVal = DBNull.
Value
;
managementclass.cs (1)
93
if (className != System.DBNull.
Value
)
managementobject.cs (1)
2691
path = (System.DBNull.
Value
!= val) ? (new ManagementPath((string)val)) : (new ManagementPath ());
managementpath.cs (2)
109
if ((status < 0) || (val == System.DBNull.
Value
))
122
if (System.DBNull.
Value
== val)
property.cs (3)
276
if ((System.DBNull.
Value
!= wmiValue) && (null != wmiValue))
389
object wmiValue = System.DBNull.
Value
;
621
object wmiValue = System.DBNull.
Value
;
propertyset.cs (1)
498
object dummyObj = System.DBNull.
Value
;
qualifier.cs (1)
101
object wmiValue = System.DBNull.
Value
;
System.ServiceModel (3)
System\ServiceModel\Channels\UriPrefixTable.cs (3)
104
item = value == DBNull.
Value
? null : (TItem)value;
111
Fx.Assert(item != DBNull.
Value
, "Can't add DBNull to UriPrefixTable.");
114
this.lookupCache.Add(key, item ?? (object)DBNull.
Value
);
System.ServiceModel.Internals (1)
System\Runtime\Collections\HopperCache.cs (1)
80
if (this.weak && !object.ReferenceEquals(value, DBNull.
Value
))
System.Web (12)
Management\SqlServices.cs (1)
563
if (res == null || res == System.DBNull.
Value
) {
Security\SQLMembershipProvider.cs (1)
1828
param.Value = DBNull.
Value
;
UI\DataBinder.cs (3)
130
if ((value == null) || (value == System.DBNull.
Value
)) {
189
if ((value == null) || (value == System.DBNull.
Value
)) {
296
if ((value == null) || (value == System.DBNull.
Value
)) {
UI\WebControls\ObjectDataSource.cs (2)
836
if ((entry.Value != null) && (entry.Value != DBNull.
Value
)) {
841
if (entry.Value == DBNull.
Value
) {
UI\WebControls\ObjectDataSourceView.cs (1)
1586
parameterValue = DBNull.
Value
;
UI\WebControls\Parameter.cs (1)
287
return DBNull.
Value
;
UI\WebControls\SqlDataSource.cs (2)
895
if ((entry.Value != null) && (entry.Value != DBNull.
Value
)) {
900
if (entry.Value == DBNull.
Value
) {
UI\WebControls\SqlDataSourceView.cs (1)
1448
parameter.Value = DBNull.
Value
;
System.Web.DataVisualization (3)
Common\General\DataManipulator.cs (3)
1024
xValue = DBNull.
Value
;
1043
xValue = DBNull.
Value
;
1055
yValue = DBNull.
Value
;
System.Web.Entity (1)
System\Data\WebControls\EntityDataSourceView.cs (1)
1689
return DBNull.
Value
;
System.Web.Extensions (1)
Script\Serialization\JavaScriptSerializer.cs (1)
403
if (o == null || DBNull.
Value
.Equals(o)) {
System.Web.Mobile (1)
UI\MobileControls\ObjectListField.cs (1)
215
if ((data != null) && (data != System.DBNull.
Value
))
System.Windows.Forms (19)
winforms\Managed\System\WinForms\DataGridViewCellStyle.cs (3)
179
return System.DBNull.
Value
;
191
if (value == System.DBNull.
Value
&&
337
return this.Properties.GetObject(PropDataSourceNullValue) == System.DBNull.
Value
;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (6)
1148
if (value == null || ((this.ValueType != null && !this.ValueType.IsAssignableFrom(value.GetType())) && value != System.DBNull.
Value
))
1179
if (value == System.DBNull.
Value
)
1181
displayValue = System.DBNull.
Value
;
1210
value != System.DBNull.
Value
&&
2684
if (originalValue == System.DBNull.
Value
)
2686
value = System.DBNull.
Value
;
winforms\Managed\System\WinForms\Formatter.cs (9)
22
static private Object defaultDataSourceNullValue = System.DBNull.
Value
;
51
value = System.DBNull.
Value
;
96
if (value == System.DBNull.
Value
|| value == null) {
240
if (result == System.DBNull.
Value
) {
268
if (EqualsFormattedNullValue(value, formattedNullValue, formatInfo) || value == System.DBNull.
Value
) {
269
return System.DBNull.
Value
;
296
return DBNull.
Value
;
449
value == System.DBNull.
Value
||
460
if (dataSourceNullValue == null || dataSourceNullValue == DBNull.
Value
)
winforms\Managed\System\WinForms\ListControl.cs (1)
592
return (string) Formatter.FormatObject(filteredItem, typeof(String), this.DisplayMemberConverter, stringTypeConverter, formatString, formatInfo, null, System.DBNull.
Value
);
System.Windows.Forms.DataVisualization (3)
Common\General\DataManipulator.cs (3)
1024
xValue = DBNull.
Value
;
1043
xValue = DBNull.
Value
;
1055
yValue = DBNull.
Value
;
System.Workflow.Runtime (3)
Tracking\SqlTrackingQuery.cs (1)
138
if (DBNull.
Value
== reader[4])
Tracking\SqlTrackingService.cs (2)
2109
command.Parameters.Add(DbResourceAllocator.NewDbParameter("@Order", DBNull.
Value
));
2131
command.Parameters.Add(DbResourceAllocator.NewDbParameter("@Order", DBNull.
Value
));
System.Xml (13)
System\Xml\Serialization\Mappings.cs (1)
48
get { return defaultValue != null && defaultValue != DBNull.
Value
; }
System\Xml\Serialization\SoapReflectionImporter.cs (1)
683
if (a.SoapDefaultValue == null || a.SoapDefaultValue == DBNull.
Value
) return null;
System\Xml\Serialization\XmlCodeExporter.cs (3)
317
return DBNull.
Value
;
370
return DBNull.
Value
;
430
if (value == DBNull.
Value
) {
System\Xml\Serialization\XmlReflectionImporter.cs (1)
1859
if (a.XmlDefaultValue == null || a.XmlDefaultValue == DBNull.
Value
) return null;
System\Xml\Serialization\XmlSchemaExporter.cs (1)
778
if (value == null || value == DBNull.
Value
)
System\Xml\Serialization\XmlSerializationReader.cs (1)
4285
if (element.Default != null && element.Default != DBNull.
Value
&& element.Mapping.TypeDesc.IsValueType) {
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3035
if (element.Default != null && element.Default != DBNull.
Value
&& element.Mapping.TypeDesc.IsValueType) {
System\Xml\Serialization\XmlSerializationWriter.cs (2)
1404
bool hasDefault = defaultValue != null && defaultValue != DBNull.
Value
;
1476
bool hasDefault = defaultValue != null && defaultValue != DBNull.
Value
&& mapping.TypeDesc.HasDefaultSupport;
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
85
bool hasDefault = defaultValue != null && defaultValue != DBNull.
Value
;
177
bool hasDefault = defaultValue != null && defaultValue != DBNull.
Value
&& mapping.TypeDesc.HasDefaultSupport;