Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmadevi S <uma@mono-cvs.ximian.com>2004-07-20 12:27:30 +0400
committerUmadevi S <uma@mono-cvs.ximian.com>2004-07-20 12:27:30 +0400
commitd50e91d67f45362c2ee80a02a5efec2258502428 (patch)
tree44d978eb86f6e5cd93bb6c3431e2bd049674850d /mcs/class/System.Data/System.Data.SqlTypes
parent2b0d5288b73157a9febe56afc79268ceaf80f4e9 (diff)
2004-07-21 Umadevi S <sumadevi@novell.com>
* SqlInt16.cs, SqlInt32.cs, SqlInt64.cs - Added Modulus,CompareTo method from .NET2.0 svn path=/trunk/mcs/; revision=31309
Diffstat (limited to 'mcs/class/System.Data/System.Data.SqlTypes')
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/ChangeLog3
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs26
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlInt32.cs23
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs23
4 files changed, 68 insertions, 7 deletions
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
index ff7162d388d..572b614f7e0 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
@@ -1,3 +1,6 @@
+2004-07-21 Umadevi S <sumadevi@novell.com>
+ * SqlInt16.cs, SqlInt32.cs, SqlInt64.cs - Added Modulus,CompareTo method from .NET2.0
+
2004-07-14 Umadevi S <sumadevi@novell.com>
* SqlMoney.cs, SqlSingle.cs - Added CompareTo method from .NET2.0
* Added new Enum StorageState.cs
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs
index a9885bd7401..1d4084eaf20 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs
@@ -100,10 +100,22 @@ namespace System.Data.SqlTypes
return 1;
else if (!(value is SqlInt16))
throw new ArgumentException (Locale.GetText ("Value is not a System.Data.SqlTypes.SqlInt16"));
- else if (((SqlInt16)value).IsNull)
+ return CompareSqlInt16 ((SqlInt16) value);
+ }
+
+ #if NET_2_0
+ public int CompareTo (SqlInt16 value)
+ {
+ return CompareSqlInt16 (value);
+ }
+ #endif
+
+ private int CompareSqlInt16 (SqlInt16 value)
+ {
+ if (((SqlInt16)value).IsNull)
return 1;
else
- return this.value.CompareTo (((SqlInt16)value).Value);
+ return this.value.CompareTo (value.Value);
}
public static SqlInt16 Divide (SqlInt16 x, SqlInt16 y)
@@ -157,7 +169,15 @@ namespace System.Data.SqlTypes
{
return (x % y);
}
-
+
+ #if NET_2_0
+ public static SqlInt16 Modulus (SqlInt16 x, SqlInt16 y)
+ {
+ return (x % y);
+ }
+ #endif
+
+
public static SqlInt16 Multiply (SqlInt16 x, SqlInt16 y)
{
return (x * y);
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt32.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt32.cs
index 998ebdf1616..08a0ad9eb21 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt32.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt32.cs
@@ -108,10 +108,22 @@ namespace System.Data.SqlTypes
return 1;
else if (!(value is SqlInt32))
throw new ArgumentException (Locale.GetText ("Value is not a System.Data.SqlTypes.SqlInt32"));
- else if (((SqlInt32)value).IsNull)
+ return CompareSqlInt32 ((SqlInt32) value);
+ }
+
+ #if NET_2_0
+ public int CompareTo (SqlInt32 value)
+ {
+ return CompareSqlInt32 (value);
+ }
+ #endif
+
+ private int CompareSqlInt32 (SqlInt32 value)
+ {
+ if (value.IsNull)
return 1;
else
- return this.value.CompareTo (((SqlInt32)value).Value);
+ return this.value.CompareTo (value.Value);
}
public static SqlInt32 Divide(SqlInt32 x, SqlInt32 y)
@@ -166,6 +178,13 @@ namespace System.Data.SqlTypes
return (x % y);
}
+ #if NET_2_0
+ public static SqlInt32 Modulus (SqlInt32 x, SqlInt32 y)
+ {
+ return (x % y);
+ }
+ #endif
+
public static SqlInt32 Multiply(SqlInt32 x, SqlInt32 y)
{
return (x * y);
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs
index 2b3379307de..c9a22a26327 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt64.cs
@@ -102,10 +102,22 @@ namespace System.Data.SqlTypes
return 1;
else if (!(value is SqlInt64))
throw new ArgumentException (Locale.GetText ("Value is not a System.Data.SqlTypes.SqlInt64"));
- else if (((SqlInt64)value).IsNull)
+ return CompareSqlInt64 ((SqlInt64) value);
+ }
+
+ #if NET_2_0
+ public int CompareTo (SqlInt64 value)
+ {
+ return CompareSqlInt64 ((SqlInt64) value);
+ }
+ #endif
+
+ private int CompareSqlInt64 (SqlInt64 value)
+ {
+ if (value.IsNull)
return 1;
else
- return this.value.CompareTo (((SqlInt64)value).Value);
+ return this.value.CompareTo (value.Value);
}
public static SqlInt64 Divide (SqlInt64 x, SqlInt64 y)
@@ -160,6 +172,13 @@ namespace System.Data.SqlTypes
return (x % y);
}
+ #if NET_2_0
+ public static SqlInt64 Modulus (SqlInt64 x, SqlInt64 y)
+ {
+ return (x % y);
+ }
+ #endif
+
public static SqlInt64 Multiply (SqlInt64 x, SqlInt64 y)
{
return (x * y);