Here are the examples of the csharp api class System.Data.Common.DataStorage.IsObjectNull(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
24 Examples
0
1. Example
Project: referencesource
Source File: DataExpression.cs
Source File: DataExpression.cs
internal static bool IsUnknown(object value) { return DataStorage.IsObjectNull(value); }
0
2. Example
Project: referencesource
Source File: DataColumnPropertyDescriptor.cs
Source File: DataColumnPropertyDescriptor.cs
public override bool CanResetValue(object component) { DataRowView dataRowView = (DataRowView) component; if (!column.IsSqlType) return (dataRowView.GetColumnValue(column) != DBNull.Value); return (!DataStorage.IsObjectNull(dataRowView.GetColumnValue(column))); }
0
3. Example
Project: referencesource
Source File: DataRelation.cs
Source File: DataRelation.cs
private static bool IsKeyNull(object[] values) { for (int i = 0; i < values.Length; i++) { if (!DataStorage.IsObjectNull(values[i])) return false; } return true; }
0
4. Example
Project: referencesource
Source File: ForeignKeyConstraint.cs
Source File: ForeignKeyConstraint.cs
internal bool IsKeyNull( object[] values ) { for (int i = 0; i < values.Length; i++) { if (! DataStorage.IsObjectNull(values[i])) return false; } return true; }
0
5. Example
Project: referencesource
Source File: SQLBinaryStorage.cs
Source File: SQLBinaryStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); Debug.Assert((value.GetType() == typeof(SqlBinary)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
6. Example
Project: referencesource
Source File: SQlBooleanStorage.cs
Source File: SQlBooleanStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); Debug.Assert((value.GetType() == typeof(SqlBoolean)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
7. Example
Project: referencesource
Source File: SQLBytesStorage.cs
Source File: SQLBytesStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlBytes)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
8. Example
Project: referencesource
Source File: SQLByteStorage.cs
Source File: SQLByteStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlByte)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
9. Example
Project: referencesource
Source File: SQLCharsStorage.cs
Source File: SQLCharsStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlChars)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
10. Example
Project: referencesource
Source File: SQLDateTimeStorage.cs
Source File: SQLDateTimeStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
11. Example
Project: referencesource
Source File: SQLDecimalStorage.cs
Source File: SQLDecimalStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
12. Example
Project: referencesource
Source File: SQLDoubleStorage.cs
Source File: SQLDoubleStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlDouble)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
13. Example
Project: referencesource
Source File: SQLGuidStorage.cs
Source File: SQLGuidStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlGuid)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
14. Example
Project: referencesource
Source File: SQLInt16Storage.cs
Source File: SQLInt16Storage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlInt16)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
15. Example
Project: referencesource
Source File: SQLInt32Storage.cs
Source File: SQLInt32Storage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlInt32)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString()); }
0
16. Example
Project: referencesource
Source File: SQLInt64Storage.cs
Source File: SQLInt64Storage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlInt64)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
17. Example
Project: referencesource
Source File: SQLMoneyStorage.cs
Source File: SQLMoneyStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlMoney)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
18. Example
Project: referencesource
Source File: SQLSingleStorage.cs
Source File: SQLSingleStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we should have null here"); Debug.Assert((value.GetType() == typeof(SqlSingle)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
19. Example
Project: referencesource
Source File: SQLStringStorage.cs
Source File: SQLStringStorage.cs
override public string ConvertObjectToXml(object value) { Debug.Assert(!DataStorage.IsObjectNull(value), "we shouldn't have null here"); Debug.Assert((value.GetType() == typeof(SqlString)), "wrong input type"); StringWriter strwriter = new StringWriter(FormatProvider); // consider passing cultureinfo with CultureInfo.InvariantCulture using (XmlTextWriter xmlTextWriter = new XmlTextWriter (strwriter)) { ((IXmlSerializable)value).WriteXml(xmlTextWriter); } return (strwriter.ToString ()); }
0
20. Example
Project: referencesource
Source File: DataColumn.cs
Source File: DataColumn.cs
internal bool IsMaxLengthViolated() { if (MaxLength < 0) return true; bool error = false; object value; string errorText = null; foreach (DataRow dr in Table.Rows) { if (dr.HasVersion(DataRowVersion.Current)) { value = dr[this]; if (!this.isSqlType) { if (value != null && value != DBNull.Value && ((string)value).Length > MaxLength) { if (errorText == null) { errorText = ExceptionBuilder.MaxLengthViolationText(this.ColumnName); } dr.RowError = errorText; dr.SetColumnError(this, errorText); error = true; } } else { if (!DataStorage.IsObjectNull(value) && ((SqlString)value).Value.Length > MaxLength) { if (errorText == null) { errorText = ExceptionBuilder.MaxLengthViolationText(this.ColumnName); } dr.RowError = errorText; dr.SetColumnError(this, errorText); error = true; } } } } return error; }
0
21. Example
Project: referencesource
Source File: DataColumn.cs
Source File: DataColumn.cs
internal string GetColumnValueAsString(DataRow row, DataRowVersion version) { object objValue = this[row.GetRecordFromVersion(version)]; if (DataStorage.IsObjectNull(objValue)) { return null; } string value = ConvertObjectToXml(objValue); Debug.Assert(value != null); return value; }
0
22. Example
Project: referencesource
Source File: DataColumn.cs
Source File: DataColumn.cs
internal protected void CheckNotAllowNull() { if (_storage == null) return; if (sortIndex != null) { if (sortIndex.IsKeyInIndex(_storage.NullValue)) {// here we do use strong typed NULL for Sql types throw ExceptionBuilder.NullKeyValues(ColumnName); } } else { // since we do not have index, we so sequential search foreach (DataRow dr in this.table.Rows) { if (dr.RowState == DataRowState.Deleted) continue; if (!implementsINullable) { if (dr[this] == DBNull.Value) { throw ExceptionBuilder.NullKeyValues(ColumnName); } } else { if (DataStorage.IsObjectNull(dr[this])) { throw ExceptionBuilder.NullKeyValues(ColumnName); } } } } }
0
23. Example
Project: referencesource
Source File: FunctionNode.cs
Source File: FunctionNode.cs
private object EvalFunction(FunctionId id, object[] argumentValues, DataRow row, DataRowVersion vers/n ..... /n //View Source file for more details /n }
0
24. Example
Project: referencesource
Source File: BinaryNode.cs
Source File: BinaryNode.cs
private object EvalBinaryOp(int op, ExpressionNode left, ExpressionNode right, DataRow row, DataRowV/n ..... /n //View Source file for more details /n }