NullableTypes/src/Types DbNullConvert.cs,1.7,1.8
Status: Inactive
Brought to you by:
lukadotnet
From: Damien G. <dam...@us...> - 2005-10-25 11:50:16
|
Update of /cvsroot/nullabletypes/NullableTypes/src/Types In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26825/src/Types Modified Files: DbNullConvert.cs Log Message: Remove long and string parse support for NullableTimeSpan. Index: DbNullConvert.cs =================================================================== RCS file: /cvsroot/nullabletypes/NullableTypes/src/Types/DbNullConvert.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DbNullConvert.cs 11 Oct 2005 12:19:41 -0000 1.7 --- DbNullConvert.cs 25 Oct 2005 11:50:07 -0000 1.8 *************** *** 17,20 **** --- 17,21 ---- // 05-Sep-2005 DamienG Upgrade Added NullableTimeSpan. // 11-Oct-2005 DamienG Bugfix Correct exception raised XML documentation for NullableTimeSpan. + // 25-Oct-2005 DamienG Upgrade Remove long and string parse support for NullableTimeSpan. // *************** *** 458,462 **** /// </exception> /// <exception cref="System.InvalidCastException"> ! /// <paramref name="x"/> is not DBNull, <see cref="System.TimeSpan"/> or <see cref="System.Int64" />. /// </exception> public static NullableTimeSpan ToNullableTimeSpan(object x) { --- 459,463 ---- /// </exception> /// <exception cref="System.InvalidCastException"> ! /// <paramref name="x"/> is not DBNull or <see cref="System.TimeSpan"/>. /// </exception> public static NullableTimeSpan ToNullableTimeSpan(object x) { *************** *** 464,476 **** return NullableTimeSpan.Null; - if (x is long) - return new NullableTimeSpan((long)x); - if (x is sys.TimeSpan) return new NullableTimeSpan((sys.TimeSpan) x); - if (x is string) - return NullableTimeSpan.Parse((string) x); - if (x == null) throw new sys.ArgumentNullException("x"); --- 465,471 ---- *************** *** 478,482 **** throw new sys.InvalidCastException( string.Format(sysGlb.CultureInfo.CurrentCulture, Locale.GetText( ! "Value is not a {0} neither a DBNull Value."), "System.TimeSpan, System.String, System.Int64")); } #endregion // To converters --- 473,477 ---- throw new sys.InvalidCastException( string.Format(sysGlb.CultureInfo.CurrentCulture, Locale.GetText( ! "Value is not a {0} neither a DBNull Value."), "System.TimeSpan")); } #endregion // To converters |