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

◆ ChangeTypeForDefaultValue()

static object System.Data.Common.SqlConvert.ChangeTypeForDefaultValue ( object value,
Type type,
IFormatProvider formatProvider )
inlinestatic

Definition at line 306 of file SqlConvert.cs.

307 {
308 if (type == typeof(BigInteger))
309 {
310 if (DBNull.Value == value || value == null)
311 {
312 return DBNull.Value;
313 }
314 return BigIntegerStorage.ConvertToBigInteger(value, formatProvider);
315 }
316 if (value is BigInteger)
317 {
318 return BigIntegerStorage.ConvertFromBigInteger((BigInteger)value, type, formatProvider);
319 }
320 return ChangeType2(value, DataStorage.GetStorageType(type), type, formatProvider);
321 }
static object ChangeType2(object value, StorageType stype, Type type, IFormatProvider formatProvider)

References System.Data.Common.SqlConvert.ChangeType2(), System.Data.Common.BigIntegerStorage.ConvertFromBigInteger(), System.Data.Common.BigIntegerStorage.ConvertToBigInteger(), System.Xml.Dictionary, System.Data.Common.DataStorage.GetStorageType(), System.type, System.DBNull.Value, and System.value.