2008-10-07 Daniel Morgan <monodanmorg@yahoo.com>
[mono.git] / mcs / class / System.Data / System.Data.Common / RowUpdatedEventArgs.cs
index b4314c32e71d45ce419457d2856a61454e81fc3b..71135c9d04eb73eeacf6cb6a3dce9de09b072658 100644 (file)
 
 using System.Data;
 
-namespace System.Data.Common {
-       public abstract class RowUpdatedEventArgs : EventArgs
+namespace System.Data.Common
+{
+       public
+#if !NET_2_0
+       abstract
+#endif
+       class RowUpdatedEventArgs : EventArgs
        {
                #region Fields
 
                DataRow dataRow;
                IDbCommand command;
                StatementType statementType;
-               DataTableMapping tableMapping;  
+               DataTableMapping tableMapping;
                Exception errors;
                UpdateStatus status;
                int recordsAffected;
@@ -51,16 +56,18 @@ namespace System.Data.Common {
 
                #region Constructors
 
-               [MonoTODO]
-               protected RowUpdatedEventArgs (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) 
+#if NET_2_0
+               public
+#else
+               protected
+#endif
+               RowUpdatedEventArgs (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) 
                {
                        this.dataRow = dataRow;
                        this.command = command;
                        this.statementType = statementType;
                        this.tableMapping = tableMapping;
-                       this.errors = null;
                        this.status = UpdateStatus.Continue;
-                       this.recordsAffected = 0; // FIXME
                }
 
                #endregion // Constructors
@@ -72,7 +79,11 @@ namespace System.Data.Common {
                }
 
                public Exception Errors {
-                       get { return errors; }
+                       get {
+                               if (errors == null)
+                                       errors =  new DataException ("RowUpdatedEvent: No additional information is available!");
+                               return errors; 
+                       }
                        set { errors = value; }
                }
 
@@ -97,6 +108,26 @@ namespace System.Data.Common {
                        get { return tableMapping; }
                }
 
+#if NET_2_0
+               public int RowCount {
+                       get { return 0; }
+               }
+#endif
+
                #endregion // Properties
+
+               #region Methods
+
+#if NET_2_0
+               public void CopyToRows (DataRow[] array)
+               {
+               }
+
+               public void CopyToRows (DataRow[] array, int arrayIndex)
+               {
+               }
+#endif
+
+               #endregion //Methods
        }
 }