From: Donald L M. Jr. <lu...@us...> - 2005-02-08 19:14:45
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17703/src/Nullables Modified Files: NullableBoolean.cs NullableByte.cs NullableDateTime.cs NullableDecimal.cs NullableDouble.cs NullableGuid.cs NullableInt16.cs NullableInt32.cs NullableInt64.cs NullableSByte.cs NullableSingle.cs Log Message: Changed the behavior of Nullables.Value (getter) to throw an InvalidOperationException when there is no value (null). This was intended (but forgotten). Index: NullableInt16.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt16.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableInt16.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableInt16.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public Int16 Value { ! get { return _value; } } --- 37,47 ---- public Int16 Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableInt32.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt32.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableInt32.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableInt32.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 38,42 **** public Int32 Value { ! get { return _value; } } --- 38,48 ---- public Int32 Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } *************** *** 158,162 **** #region IFormattable Members ! string System.IFormattable.ToString(string format, IFormatProvider formatProvider) { if (HasValue) --- 164,168 ---- #region IFormattable Members ! public string ToString(string format, IFormatProvider formatProvider) { if (HasValue) Index: NullableByte.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableByte.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableByte.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableByte.cs 8 Feb 2005 19:13:07 -0000 1.4 *************** *** 37,41 **** public Byte Value { ! get { return _value; } } --- 37,47 ---- public Byte Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableSByte.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableSByte.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableSByte.cs 10 Dec 2004 18:24:22 -0000 1.1 --- NullableSByte.cs 8 Feb 2005 19:13:11 -0000 1.2 *************** *** 39,43 **** public SByte Value { ! get { return _value; } } --- 39,49 ---- public SByte Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableDouble.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDouble.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableDouble.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableDouble.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public Double Value { ! get { return _value; } } --- 37,47 ---- public Double Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableDateTime.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDateTime.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableDateTime.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableDateTime.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public DateTime Value { ! get { return _value; } } --- 37,47 ---- public DateTime Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableDecimal.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDecimal.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableDecimal.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableDecimal.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public Decimal Value { ! get { return _value; } } --- 37,47 ---- public Decimal Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableBoolean.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableBoolean.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NullableBoolean.cs 10 Dec 2004 18:24:21 -0000 1.2 --- NullableBoolean.cs 8 Feb 2005 19:12:56 -0000 1.3 *************** *** 37,41 **** public Boolean Value { ! get { return _value; } } --- 37,47 ---- public Boolean Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableSingle.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableSingle.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableSingle.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableSingle.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public Single Value { ! get { return _value; } } --- 37,47 ---- public Single Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableGuid.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableGuid.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableGuid.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableGuid.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 38,42 **** public Guid Value { ! get { return _value; } } --- 38,48 ---- public Guid Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } Index: NullableInt64.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt64.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NullableInt64.cs 10 Dec 2004 18:24:22 -0000 1.3 --- NullableInt64.cs 8 Feb 2005 19:13:11 -0000 1.4 *************** *** 37,41 **** public Int64 Value { ! get { return _value; } } --- 37,47 ---- public Int64 Value { ! get ! { ! if (hasValue) ! return _value; ! else ! throw new InvalidOperationException("Nullable type must have a value."); ! } } |