[Mono-list] DataRow.cs new file for System.Data

Kai Strempel kstrempel@gmx.de
Fri, 22 Mar 2002 14:47:13 +0100 (MET)


Hello mono folks.. I'am new in developing for open source projects.
Actuallly I try to help the System.Data team. My first action was to implement a the
DataRow.cs class. Until  now you cannot compile it, because classes are
missing in the System.Data namespace..

All methods only implemented as stubs... 

//
// System.Data.DataRow.cs
//
// Author:
//   Kai Strempel (kstrempel@gmx.de)
//
// (C) Kai Strempel
//

using System;

namespace System.Data
{
	/// <summary>
	/// 
	/// </summary>
	public class DataRow
	{
		private bool _hasErrors = false;

		#region Constructors
		/// <summary>
		/// Represents a row of data in a DataTable.
		/// </summary>
		public DataRow()
		{

		}
		#endregion
		
		#region Properties
		/// <summary>
		/// Gets a value indicating whether there are errors in a columns
collection.
		/// </summary>
		public bool HasErrors
		{
			get
			{
				return _hasErrors;
			}
		}

		/// <summary>
		/// Gets or sets the data stored in the column specified by name.
		/// </summary>
		public object this[ string columnname ]
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the data stored in the specified DataColumn.
		/// </summary>
		public object this[ DataColumn column ]
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the data stored in the column specified by index.
		/// </summary>
		public object this[ int columnIndex ]
		{
			get;
			set;
		}
		/// <summary>
		/// Gets the specified version of data stored in the named column.
		/// </summary>
		public object this[ string columnName, DataRowVersion version ]
		{
			get;
		}

		/// <summary>
		/// Gets the specified version of data stored in the specified DataColumn.
		/// </summary>
		public object this[ DataColumn column, DataRowVersion version ]
		{
			get;
		}

		/// <summary>
		/// Gets the data stored in the column, specified by index and version of
the 
		/// data to retrieve
		/// </summary>
		public object this[ int columnIndex, DataRowVersion version ]
		{
			get;
		}

		/// <summary>
		/// Gets or sets all of the values for this row through an array.
		/// </summary>
		public object[] ItemArray
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the custom error description for a row.
		/// </summary>
		public string RowError
		{
			get;
			set;
		}
		
		/// <summary>
		/// Gets the current state of the row in regards to its relationship to
the DataRowCollection.
		/// </summary>
		public DataRowState RowState
		{
			get;
		}

		/// <summary>
		/// Gets the DataTable for which this row has a schema.
		/// </summary>
		public DataTable Table
		{
			get;
		}
		#endregion

		#region Methods

		/// <summary>
		/// Commits all the changes made to this row since the last time
AcceptChanges was called.
		/// </summary>
		public void AcceptChanges()
		{

		}
		
		/// <summary>
		/// Begins an edit operation on a DataRow object.
		/// </summary>
		public void BeginEdit()
		{

		}

		/// <summary>
		/// Cancels the current edit on the row.
		/// </summary>
		public void CancelEdit()
		{

		}

		/// <summary>
		/// Clears the errors for the row, including the RowError and errors set
with SetColumnError.
		/// </summary>
		public void ClearErrors()
		{
		}

		/// <summary>
		/// Deletes the row
		/// </summary>
		public void Delete()
		{

		}
		
		/// <summary>
		/// Ends the edit occurring on the row.
		/// </summary>
		public void EndEdit()
		{

		}
		
		/// <summary>
		/// Gets the child rows of this DataRow using the specified DataRelation.
		/// </summary>
		public DataRow[] GetChildRows( DataRelation relation )
		{
			return null;
		}

		/// <summary>
		/// Gets the child rows of a DataRow using the specified RelationName of a
DataRelation.
		/// </summary>
		public DataRow[] GetChildRows( string relationname )
		{
			return null;
		}

		/// <summary>
		/// Gets the child rows of a DataRow using the specified DataRelation, and
DataRowVersion.
		/// </summary>
		public DataRow[] GetChildRows( DataRelation relation, DataRowVersion
version )
		{
			return null;
		}
			
		/// <summary>
		/// Gets the specified version of the child rows of a DataRow using the
specified RelationName 
		/// of a DataRelation, and DataRowVersion
		/// </summary>
		public DataRow[] GetChildRows( string relationname, DataRowVersion version
)
		{
			return null;
		}

		/// <summary>
		/// Gets the error description of the specified DataColumn.
		/// </summary>
		public string GetColumnError( DataColumn column )
		{
			return null;
		}

		/// <summary>
		/// Gets the error description for the column specified by index.
		/// </summary>
		public string GetColumnError( int columnindex )
		{
			return null;
		}

		/// <summary>
		/// Gets the error description for a column, specified by name.
		/// </summary>
		public string GetColumnError( string columnname )
		{
			return null;
		}

		/// <summary>
		/// Gets an array of columns that have errors.
		/// </summary>
		public DataColumn[] GetColumnsInError()
		{
			return null;
		}

		/// <summary>
		/// Gets the parent row of a DataRow using the specified DataRelation.
		/// </summary>
		public DataRow GetParentRow( DataRelation relation )
		{
			return null;
		}

		/// <summary>
		/// Gets the parent row of a DataRow using the specified RelationName of a
DataRelation.
		/// </summary>
		public DataRow GetParentRow( string relationname )
		{
			return null;
		}

		/// <summary>
		/// Gets the parent row of a DataRow using the specified DataRelation, and
DataRowVersion.
		/// </summary>
		public DataRow GetParentRow( DataRelation relation, DataRowVersion version
)
		{
			return null;
		}

		/// <summary>
		/// Gets the parent row of a DataRow using the specified RelationName of a
DataRelation, 
		/// and DataRowVersion.
		/// </summary>
		public DataRow GetParentRow( string relationname, DataRowVersion version )
		{
			return null;
		}

		/// <summary>
		/// Gets the parent rows of a DataRow using the specified DataRelation.
		/// </summary>
		public DataRow[] GetParentRows( DataRelation relation )
		{	
			return null;
		}

		/// <summary>
		/// Gets the parent rows of a DataRow using the specified RelationName of
a DataRelation.
		/// </summary>
		public DataRow[] GetParentRows( string relationname )
		{
			return null;
		}

		/// <summary>
		/// Gets the parent rows of a DataRow using the specified DataRelation,
and DataRowVersion.
		/// </summary>
		public DataRow[] GetParentRows( DataRelation relation, DataRowVersion
version )
		{
			return null;
		}

		/// <summary>
		/// Gets the parent rows of a DataRow using the specified RelationName of
a DataRelation, 
		/// and DataRowVersion.
		/// </summary>
		public DataRow[] GetParentRows( string relationname, DataRowVersion
version )
		{
			return null;
		}

		/// <summary>
		/// Gets a value indicating whether a specified version exists.
		/// </summary>
		public bool HasVersion( DataRowVersion version )
		{
			return false;
		}

		/// <summary>
		/// Gets a value indicating whether the specified DataColumn contains a
null value.
		/// </summary>
		public bool IsNull( DataColumn column )
		{
			return false;
		}

		/// <summary>
		/// Gets a value indicating whether the column at the specified index
contains a null value.
		/// </summary>
		public bool IsNull( int columnindex )
		{
			return false;
		}

		/// <summary>
		/// Gets a value indicating whether the named column contains a null
value.
		/// </summary>
		public bool IsNull( string columnname )
		{
			return false;	
		}

		/// <summary>
		/// Gets a value indicating whether the specified DataColumn and 
		/// DataRowVersion contains a null value.
		/// </summary>
		/// <param name="column"></param>
		public bool IsNull( DataColumn column, DataRowVersion version )
		{
			return false;
		}

		/// <summary>
		/// Rejects all changes made to the row since AcceptChanges was last
called.
		/// </summary>
		public void RejectChanges()
		{

		}
			
		/// <summary>
		/// Sets the error description for a column specified as a DataColumn.
		/// </summary>
		public void SetColumnError( DataColumn column, string error )
		{

		}

		/// <summary>
		/// Sets the error description for a column specified by index.
		/// </summary>
		public void SetColumnError( int columnindex, string error )
		{

		}

		/// <summary>
		/// Sets the error description for a column specified by name.
		/// </summary>
		public void SetColumnError( string columnname, string error )
		{

		}

		/// <summary>
		/// Sets the parent row of a DataRow with specified new parent DataRow.
		/// </summary>
		public void SetParentRow( DataRow parentRow )
		{

		}

		/// <summary>
		/// Sets the parent row of a DataRow with specified new parent DataRow and
DataRelation.
		/// </summary>
		public void SetParentRow( DataRow parentRow, DataRelation relation )
		{
						
		}

		/// <summary>
		/// Sets the value of a DataColumn with the specified name to unspecified.
		/// </summary>
		public void SetUnspecified( DataColumn column )
		{

		}

		#endregion



	}
}

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net