2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 6 Apr 2004 18:25:51 +0000 (18:25 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 6 Apr 2004 18:25:51 +0000 (18:25 -0000)
* System.Data/Constraint.cs:
* System.Data/DataColumnCollection.cs:
* System.Data/DataRelationCollection.cs:
* System.Data/DataRowCollection.cs:
* System.Data/DataTableCollection.cs:
* System.Data/InternalDataCollectionBase.cs:
* System.Data/Node.cs: CLS compliance for System.Data. Patch by Gert
Driesen. Fixes bug #56557.

* Assembly/AssemblyInfo.cs:
* System.Data.OleDb/OleDbPermissionAttribute.cs: missing bits from
Gert's patch.

svn path=/trunk/mcs/; revision=25103

12 files changed:
mcs/class/System.Data/Assembly/AssemblyInfo.cs
mcs/class/System.Data/Assembly/ChangeLog
mcs/class/System.Data/System.Data.OleDb/ChangeLog
mcs/class/System.Data/System.Data.OleDb/OleDbPermissionAttribute.cs
mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/Constraint.cs
mcs/class/System.Data/System.Data/DataColumnCollection.cs
mcs/class/System.Data/System.Data/DataRelationCollection.cs
mcs/class/System.Data/System.Data/DataRowCollection.cs
mcs/class/System.Data/System.Data/DataTableCollection.cs
mcs/class/System.Data/System.Data/InternalDataCollectionBase.cs
mcs/class/System.Data/System.Data/Node.cs

index d7fd5a9238608c445b57b50e68f51a17d114c0c0..a49bbafaff4c3a087e280c177f52891197bed7ff 100644 (file)
@@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTrademark("")]
 
 // FIXME Add once compliance is reached
-//[assembly: CLSCompliant(true)]
+[assembly: CLSCompliant(true)]
 [assembly: AssemblyDefaultAlias("System.Data.dll")]
 [assembly: AssemblyInformationalVersion("0.0.0.1")]
 [assembly: NeutralResourcesLanguage("en-US")]
@@ -45,4 +45,4 @@ using System.Runtime.InteropServices;
 [assembly: AllowPartiallyTrustedCallers]
 
 //[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
\ No newline at end of file
+//[assembly: AssemblyKeyFile("")]
index b2dd825a0e3e9ace7bdb87879af96df1bf0f4e70..d04eb7d782646ac852c3501ed43e5c82a1663b47 100644 (file)
@@ -1,5 +1,10 @@
+2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Assembly/AssemblyInfo.cs: missing bits from Gert's patch for CLS
+       compliance.
+
 2003-07-18  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
 
        * AssemblyInfo.cs: Added
        * ChangeLog: Added
-       * Locale.cs: Added
\ No newline at end of file
+       * Locale.cs: Added
index 82385062f299daa4f6a0ccdd843f1dd0ba2c4399..0c09615530cf0601a09847d2f7547a866ad8639c 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * OleDbPermissionAttribute.cs: missing bits from Gert's patch for
+       CLS compliance.
+
 2004-01-10  Atsushi Enomoto  <atsushi@ximian.com>
 
        * OleDbPermission.cs : NET_1_2 fix not to call obsolete .ctor.
index 1de7a88e6eaab77a461e7c69141e0b689c51c64c..9f007b4775595f58f6b7d255ba45bd69bf25fcb7 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Data.OleDb
                #region Constructors 
 
                [MonoTODO]
-               OleDbPermissionAttribute (SecurityAction action) 
+               public OleDbPermissionAttribute (SecurityAction action) 
                        : base (action)
                {
                }
index d3c453c4a6875dfbc7b2bfbb6f101b2d85f6d75c..484ff5f9e9ae6f4cf59a6458e76a05206c3c9073 100644 (file)
@@ -1,3 +1,14 @@
+2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Constraint.cs:
+       * DataColumnCollection.cs:
+       * DataRelationCollection.cs:
+       * DataRowCollection.cs:
+       * DataTableCollection.cs:
+       * InternalDataCollectionBase.cs:
+       * Node.cs: CLS compliance for System.Data. Patch by Gert Driesen.
+       Fixes bug #56557.
+
 2004-04-05  Jackson Harper  <jackson@ximian.com>
 
        * DataTable.cs: Add rows to the row list if there is no filter.
@@ -7,8 +18,8 @@
        * DataColumn.cs : Setting Caption to null sets it to the empty string
        (ms.net behaviour, testcase is in DataColumnTest).
        
-       * DataRow.cs : Evaluate DataColumn.Expression when such a column's value is
-       requested.
+       * DataRow.cs : Evaluate DataColumn.Expression when such a column's
+       value is requested.
 
 2004-03-30 Lluis Sanchez Gual <lluis@ximian.com>
 
index fe9e386adfab2e80aae4ab66c76c2ab4a54c4578..0261b932afdffcdeed8c32a954ce31b9413cebb0 100644 (file)
@@ -49,7 +49,7 @@ namespace System.Data {
                        _properties = new PropertyCollection();
                }
 
-               protected internal virtual DataSet _DataSet {
+               protected internal virtual DataSet DataSet {
                        get { return dataSet; }
                }
 
index 38d3805b73a21d4a0aa63c82335c098043f20735..06316711d1109a96cb90e275ad89ebc4f0d14b5f 100644 (file)
@@ -479,9 +479,9 @@ namespace System.Data {
                private int IndexOf (string name, bool error)
                {
                        int count = 0, match = -1;
-                       for (int i = 0; i < list.Count; i++)
+                       for (int i = 0; i < List.Count; i++)
                        {
-                               String name2 = ((DataColumn) list[i]).ColumnName;
+                               String name2 = ((DataColumn) List[i]).ColumnName;
                                if (String.Compare (name, name2, true) == 0)
                                {
                                        if (String.Compare (name, name2, false) == 0)
index 7a09a2cbcd5cbb1570343e413c0aa9f1b47186af..6e1d40b18378e0c10426d22a430c283b2a7cf1ba 100644 (file)
@@ -47,7 +47,7 @@ namespace System.Data {
                        {
                                get {
                                        int index = IndexOf (name, true);
-                                       return index < 0 ? null : (DataRelation) list[index];
+                                       return index < 0 ? null : (DataRelation) List[index];
                                }
                        }
 
@@ -183,7 +183,7 @@ namespace System.Data {
                        {
                                get {
                                        int index = IndexOf (name, true);
-                                       return index < 0 ? null : (DataRelation) list[index];
+                                       return index < 0 ? null : (DataRelation) List[index];
                                }
                        }
 
@@ -470,9 +470,9 @@ namespace System.Data {
                private int IndexOf (string name, bool error)
                {
                        int count = 0, match = -1;
-                       for (int i = 0; i < list.Count; i++)
+                       for (int i = 0; i < List.Count; i++)
                        {
-                               String name2 = ((DataRelation) list[i]).RelationName;
+                               String name2 = ((DataRelation) List[i]).RelationName;
                                if (String.Compare (name, name2, true) == 0)
                                {
                                        if (String.Compare (name, name2, false) == 0)
index 843f4ef1274ff2765ffc1fb72071ff5230f36912..9cbc474cd3dc1ddd4fed75171f6a51e5e1aa99ed 100644 (file)
@@ -41,7 +41,7 @@ namespace System.Data
                                if (index >= Count)
                                        throw new IndexOutOfRangeException ("There is no row at position " + index + ".");
 
-                               return (DataRow) list[index]; 
+                               return (DataRow) List[index]; 
                        }
                }
 
@@ -50,7 +50,7 @@ namespace System.Data
                /// </summary>
                protected override ArrayList List 
                {
-                       get { return list; }
+                       get { return base.List; }
                }               
 
                /// <summary>
@@ -75,9 +75,9 @@ namespace System.Data
                                ValidateDataRowInternal(row);
                        
                        row.HasParentCollection = true;
-                       list.Add (row);
+                       List.Add (row);
                        // Set the row id.
-                       row.RowID = list.Count - 1;
+                       row.RowID = List.Count - 1;
                        row.AttachRow ();
                        row.Table.ChangedDataRow (row, DataRowAction.Add);
                }
@@ -112,7 +112,7 @@ namespace System.Data
                                        }
                                }
                        }
-                       list.Clear ();
+                       List.Clear ();
                }
 
                /// <summary>
@@ -243,10 +243,10 @@ namespace System.Data
                                // we have to check that the new row doesn't colide with existing row
                                ValidateDataRowInternal(row);
                                
-                       if (pos >= list.Count)
-                               list.Add (row);
+                       if (pos >= List.Count)
+                               List.Add (row);
                        else
-                               list.Insert (pos, row);
+                               List.Insert (pos, row);
                                
                        row.HasParentCollection = true;
                        row.AttachRow ();
@@ -260,11 +260,11 @@ namespace System.Data
                        if (row == null) {
                                throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
                        }
-                       int index = list.IndexOf(row);
+                       int index = List.IndexOf(row);
                        if (index < 0) {
                                throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
                        }
-                       list.RemoveAt(index);
+                       List.RemoveAt(index);
                }
 
                /// <summary>
@@ -274,7 +274,7 @@ namespace System.Data
                {
                        if (row == null)
                                throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
-                       int index = list.IndexOf(row);
+                       int index = List.IndexOf(row);
                        if (index < 0)
                                throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
                        row.Delete();
@@ -289,9 +289,9 @@ namespace System.Data
                /// </summary>
                public void RemoveAt (int index) 
                {                       
-                       if (index < 0 || index >= list.Count)
+                       if (index < 0 || index >= List.Count)
                                throw new IndexOutOfRangeException ("There is no row at position " + index + ".");
-                       DataRow row = (DataRow)list [index];
+                       DataRow row = (DataRow)List [index];
                        row.Delete();
                        row.AcceptChanges();
                }
index f4fbf6a0901df0efcfa10ce7448bcb9adac75664..1c7aac278052800fe9948b2b27bba2c556e5f145 100644 (file)
@@ -39,13 +39,13 @@ namespace System.Data {
                #region Properties
 
                public DataTable this[int index] {
-                       get { return (DataTable)(list[index]); }
+                       get { return (DataTable)(List[index]); }
                }
 
                public DataTable this[string name] {
                        get { 
                                int index = IndexOf (name, true);
-                               return index < 0 ? null : (DataTable) list[index];
+                               return index < 0 ? null : (DataTable) List[index];
                        }
                }
 
@@ -57,7 +57,7 @@ namespace System.Data {
 #endif
 
                protected override ArrayList List {
-                       get { return list; }
+                       get { return base.List; }
                }
 
                #endregion
@@ -79,7 +79,7 @@ namespace System.Data {
                                throw new ArgumentNullException("table");
             
                        // check if the list already contains this tabe.
-                       if(list.Contains(table))
+                       if(List.Contains(table))
                                throw new ArgumentException("DataTable already belongs to this DataSet.");
             
                        // if the table name is null or empty string.
@@ -98,7 +98,7 @@ namespace System.Data {
                                        throw new DuplicateNameException("A DataTable named '" + table.TableName + "' already belongs to this DataSet.");
                        }
        
-                       list.Add (table);
+                       List.Add (table);
                        table.dataSet = dataSet;
                        OnCollectionChanged (new CollectionChangeEventArgs (CollectionChangeAction.Add, table));
                }
@@ -133,7 +133,7 @@ namespace System.Data {
 
                public void Clear () 
                {
-                       list.Clear ();
+                       List.Clear ();
                }
 
                public bool Contains (string name) 
@@ -143,7 +143,7 @@ namespace System.Data {
 
                public virtual int IndexOf (DataTable table) 
                {
-                       return list.IndexOf (table);
+                       return List.IndexOf (table);
                }
 
                public virtual int IndexOf (string name) 
@@ -154,7 +154,7 @@ namespace System.Data {
                public void Remove (DataTable table) 
                {
                        CanRemove(table, true);
-                       list.Remove(table);
+                       List.Remove(table);
                        OnCollectionChanged (new CollectionChangeEventArgs (CollectionChangeAction.Remove, table));
                }
 
@@ -167,7 +167,7 @@ namespace System.Data {
                {
                        DataTable t = this[index];
                        CanRemove(t, true);
-                       list.RemoveAt (index);
+                       List.RemoveAt (index);
                        OnCollectionChanged (new CollectionChangeEventArgs (CollectionChangeAction.Remove, t));
                }
 
@@ -194,9 +194,9 @@ namespace System.Data {
                private int IndexOf (string name, bool error)
                {
                        int count = 0, match = -1;
-                       for (int i = 0; i < list.Count; i++)
+                       for (int i = 0; i < List.Count; i++)
                        {
-                               String name2 = ((DataTable) list[i]).TableName;
+                               String name2 = ((DataTable) List[i]).TableName;
                                if (String.Compare (name, name2, true) == 0)
                                {
                                        if (String.Compare (name, name2, false) == 0)
index 091d7f98ba4316701ffa2a1f79adb16ffc8fecdb..d8d2baad3df34717a0f2215878463d23decd56d1 100644 (file)
@@ -33,8 +33,7 @@ namespace System.Data
        {
                #region Fields
 
-               // FIXME: keep list protected until mcs/mono is fixed
-               protected ArrayList list = null;
+               private ArrayList list = null;
                private bool readOnly = false;
                private bool synchronized = false; 
 
index 157e48364b9db7ada3165b82ccf8181068bd0e41..267e11b8046058659cc8f7f511dad6c67686bd54 100644 (file)
@@ -5,7 +5,7 @@ namespace System.Data
        /// <summary>
        /// Summary description for Node.
        /// </summary>
-       public class Node
+       internal class Node
        {
                protected int _iBalance;    // currently, -2 means 'deleted'
                internal Node _nNext;       // node of next index (nNext==null || nNext.iId=iId+1)