* Constraint.cs: marked methods internal to fix public API
authorGert Driesen <drieseng@users.sourceforge.net>
Fri, 4 Jun 2004 05:34:25 +0000 (05:34 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Fri, 4 Jun 2004 05:34:25 +0000 (05:34 -0000)
* ConstraintCollection.cs: to fix public API, use
DataTable.fInitInProgress to check whether initialization
of DataTable is in progress
* DataColumn.cs: added stubs for missing methods
* DataRowBuilder.cs: marked Table property internal to
fix public API
* DataSet.cs: removed extra empty destructor, marked
OnMergeFailed internal to fix public API
* DataTable.cs: use fInitInProgress field to hold init
status, to match MS.NET
* DataView.cs: added missing attributes on IsOpen

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

mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/Constraint.cs
mcs/class/System.Data/System.Data/ConstraintCollection.cs
mcs/class/System.Data/System.Data/DataColumn.cs
mcs/class/System.Data/System.Data/DataRowBuilder.cs
mcs/class/System.Data/System.Data/DataSet.cs
mcs/class/System.Data/System.Data/DataTable.cs
mcs/class/System.Data/System.Data/DataView.cs

index 95852e7c5b74304abf03a85043c9ab103d37efaf..3740e6082f328e2b0ecd732e3c996daad636168f 100644 (file)
@@ -1,3 +1,18 @@
+2004-06-04  Gert Driesen <drieseng@users.sourceforge.net>
+
+       * Constraint.cs: marked methods internal to fix public API
+       * ConstraintCollection.cs: to fix public API, use 
+       DataTable.fInitInProgress to check whether initialization 
+       of DataTable is in progress
+       * DataColumn.cs: added stubs for missing methods
+       * DataRowBuilder.cs: marked Table property internal to
+       fix public API
+       * DataSet.cs: removed extra empty destructor, marked 
+       OnMergeFailed internal to fix public API
+       * DataTable.cs: use fInitInProgress field to hold init
+       status, to match MS.NET
+       * DataView.cs: added missing attributes on IsOpen
+
 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DataSet.cs : Use NameTable.Get() before calling LookupNamespace()
index fa0b61c333c59e4f7380d3b9840185142fd39431..8013f8283c81781e7ac34c706ee0c22ba1adbef7 100644 (file)
@@ -139,7 +139,7 @@ namespace System.Data {
                        }
                }
 
-               protected internal void UpdateIndex (DataRow row)
+               internal void UpdateIndex (DataRow row)
                {
                        if (row.RowState == DataRowState.Detached || row.RowState == DataRowState.Unchanged)
                                Index.Insert (new Node (row), DataRowVersion.Default);
@@ -165,7 +165,7 @@ namespace System.Data {
                        }
                }
 
-               protected internal void RollbackIndex (DataRow row)
+               internal void RollbackIndex (DataRow row)
                {
                        Node n = Index.Find(row, DataRowVersion.Default);
                        if ( n == null)
index 1f76e22e82cda17317bec63c5bcfd2b024930617..55d666b315c141dc558f70ead0af98b71686932a 100644 (file)
@@ -236,8 +236,8 @@ namespace System.Data {
 
                        //When AddRange() occurs after BeginInit,
                         //it does not add any elements to the collection until EndInit is called.
-                        if (this.table.InitStatus == DataTable.initStatus.BeginInit){
-                                // Keep reference so that they can be added when EndInit() is called.
+                       if (this.table.fInitInProgress) {
+                               // Keep reference so that they can be added when EndInit() is called.
                                 _mostRecentConstraints = constraints;
                                 return;
                         }
index c5e5495cd9fa92cc28bdfde91620ecd9c9240566..bd68dcfd88a513e33a6616ff8a7a46f5b2ae9b05 100644 (file)
@@ -601,13 +601,24 @@ namespace System.Data {
                        unique = true;
                }
 
-
                [MonoTODO]
                internal void AssertCanAddToCollection()
                {
                        //Check if Default Value is set and AutoInc is set
                }
-               
+
+               [MonoTODO]
+               protected internal void CheckNotAllowNull ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected void CheckUnique ()
+               {
+                       throw new NotImplementedException ();
+               }
+
                [MonoTODO]
                protected internal virtual void 
                OnPropertyChanging (PropertyChangedEventArgs pcevent) {
index 8e5b6e24abcde39bb2f48354a5ba0fce69c2fa43..781e468c5f2f2f7e0283698aa8745606fe8144ad 100644 (file)
@@ -44,7 +44,7 @@ namespace System.Data
 
                #region Properties
 
-               protected internal DataTable Table {
+               internal DataTable Table {
                        get { return table; }
                }
 
index 6dd271e9c6452583b77573af4aee32991fe4bb6e..b1f8b698e6130bcaa36f7168401e015431eb524d 100644 (file)
@@ -938,14 +938,6 @@ namespace System.Data {
 
                #endregion // Public Events
 
-               #region Destructors
-
-               ~DataSet ()
-               {
-               }
-
-               #endregion Destructors
-
                #region IListSource methods
                IList IListSource.GetList ()
                {
@@ -1029,10 +1021,10 @@ namespace System.Data {
                        WriteXml (writer, XmlWriteMode.DiffGram);
                }
 
-               XmlSchema IXmlSerializable.GetSchema ()\r
-               {\r
-                       return BuildSchema ();\r
-               }\r
+               XmlSchema IXmlSerializable.GetSchema ()
+               {
+                       return BuildSchema ();
+               }
 
                protected virtual bool ShouldSerializeRelations ()
                {
@@ -1059,7 +1051,7 @@ namespace System.Data {
                {
                }
 
-               protected internal virtual void OnMergeFailed (MergeFailedEventArgs e)
+               internal virtual void OnMergeFailed (MergeFailedEventArgs e)
                {
                        if (MergeFailed != null)
                                MergeFailed (this, e);
index e0f30648dddbc5cbc922aa1cb14834853f631c2e..0be876b0be5d3cd79930f507673c684f5222aee8 100644 (file)
@@ -68,27 +68,15 @@ namespace System.Data {
                private DataRowBuilder _rowBuilder;
                private ArrayList _indexes;
                private RecordCache _recordCache;
+               protected internal bool fInitInProgress;
 
-               
                // If CaseSensitive property is changed once it does not anymore follow owner DataSet's 
                // CaseSensitive property. So when you lost you virginity it's gone for ever
                private bool _virginCaseSensitive = true;
                
-                /// <summary>
-                 /// An enum variable indicating whether BeginInit() or EndInit() is called.
-                /// Delegate to call a function which performs cleanup after EndInit() is called
-                /// </summary>
-                internal enum initStatus { NotInitialized, BeginInit, EndInit };
-               private initStatus _initStatus;
-        
                #endregion //Fields
                
                private delegate void PostEndInit();
-                
-               internal initStatus InitStatus {
-                        get{ return( _initStatus ); }
-                }
-       
 
                /// <summary>
                /// Initializes a new instance of the DataTable class with no arguments.
@@ -622,7 +610,7 @@ namespace System.Data {
                /// </summary>
                public virtual void BeginInit () 
                {
-                       _initStatus = initStatus.BeginInit;
+                       fInitInProgress = true;
                }
 
                /// <summary>
@@ -817,12 +805,10 @@ namespace System.Data {
                [MonoTODO]
                public virtual void EndInit () 
                {
-                        _initStatus = initStatus.EndInit;
-                        // Add the constraints
-                        PostEndInit _postEndInit = new PostEndInit (_constraintCollection.PostEndInit);
-                        _postEndInit();
-
-
+                       fInitInProgress = false;
+                       // Add the constraints
+                       PostEndInit _postEndInit = new PostEndInit (_constraintCollection.PostEndInit);
+                       _postEndInit();
                }
 
                /// <summary>
index 6cb419ba6f90eedc831e69bffa74d68bd233f7bd..79abf7cb46253047b46a0523bddf30640fc9bd0a 100644 (file)
@@ -397,6 +397,8 @@ namespace System.Data
                [DataSysDescription ("Indicates the data returned by this DataView has somehow changed.")]
                public event ListChangedEventHandler ListChanged;
 
+               [Browsable (false)]
+               [DataSysDescription ("DataViewIsOpenDescr")]
                protected bool IsOpen {
                        [MonoTODO]
                        get {