mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* System.Data.OleDb: added directory - for OleDb database provider classes * System.Data.SqlClient/SqlClientPermission.cs * System.Data.SqlClient/SqlClientPermissionAttribute.cs * System.Data.SqlClient/SqlCommandBuilder.cs * System.Data.SqlClient/SqlInfoMessageEventHandler.cs * System.Data.SqlClient/SqlRowUpdatedEventArgs.cs * System.Data.SqlClient/SqlRowUpdatedEventHandler.cs * System.Data.SqlClient/SqlRowUpdatingEventArgs.cs * System.Data.SqlClient/SqlRowUpdatingEventHandler.cs * Test/TestSqlException.cs * Test/TestSqlIsolationLevel.cs: added - more tests * System.Data.build: modified - added new files - excludes these too * System.Data.SqlClient/PostgresLibrary.cs - modified - comment * System.Data.SqlClient/SqlConnection.cs * System.Data.SqlClient/SqlCommand.cs * System.Data.SqlClient/SqlTransaction.cs * System.Data.SqlClient/SqlException.cs * System.Data.SqlClient/SqlErrorCollection.cs * System.Data.SqlClient/SqlError.cs: modified - transaction and exception/error handling. SqlConnection(connectionString) constructor should not automatically connect. * System.Data.SqlClient/SqlDataReader.cs * System.Data.SqlClient/SqlDataAdapter.cs * System.Data.SqlClient/SqlParameter.cs * System.Data.SqlClient/SqlParameterCollection.cs: modified - added using System.ComponentModel; * Test/TestSqlInsert.cs: modified - to use transaction svn path=/trunk/mcs/; revision=3933
116 lines
2.1 KiB
C#
116 lines
2.1 KiB
C#
//
|
|
// System.Data.SqlClient.SqlError.cs
|
|
//
|
|
// Author:
|
|
// Rodrigo Moya ([email protected])
|
|
// Daniel Morgan ([email protected])
|
|
//
|
|
// (C) Ximian, Inc 2002
|
|
//
|
|
using System;
|
|
using System.Collections;
|
|
using System.Data;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Data.SqlClient
|
|
{
|
|
/// <summary>
|
|
/// Describes an error from a SQL database.
|
|
/// </summary>
|
|
[MonoTODO]
|
|
public sealed class SqlErrorCollection : ICollection, IEnumerable
|
|
{
|
|
private int count = 0;
|
|
ArrayList errorList = new ArrayList();
|
|
|
|
internal SqlErrorCollection() {
|
|
}
|
|
|
|
internal SqlErrorCollection(byte theClass, int lineNumber,
|
|
string message, int number, string procedure,
|
|
string server, string source, byte state) {
|
|
|
|
Add (theClass, lineNumber, message,
|
|
number, procedure,
|
|
server, source, state);
|
|
}
|
|
|
|
#region Properties
|
|
|
|
[MonoTODO]
|
|
public int Count {
|
|
get {
|
|
return errorList.Count;
|
|
}
|
|
}
|
|
|
|
[MonoTODO]
|
|
public void CopyTo(Array array, int index) {
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
// [MonoTODO]
|
|
bool ICollection.IsSynchronized {
|
|
get {
|
|
throw new NotImplementedException ();
|
|
}
|
|
}
|
|
|
|
// [MonoTODO]
|
|
object ICollection.SyncRoot {
|
|
get {
|
|
throw new NotImplementedException ();
|
|
}
|
|
}
|
|
|
|
[MonoTODO]
|
|
public IEnumerator GetEnumerator() {
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
[MonoTODO]
|
|
// Index property (indexer)
|
|
public SqlError this[int index] {
|
|
get {
|
|
return (SqlError) errorList[index];
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
[MonoTODO]
|
|
public override string ToString()
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
#endregion
|
|
|
|
internal void Add(SqlError error) {
|
|
errorList.Add(error);
|
|
}
|
|
|
|
internal void Add(byte theClass, int lineNumber,
|
|
string message, int number, string procedure,
|
|
string server, string source, byte state) {
|
|
|
|
SqlError error = new SqlError(theClass,
|
|
lineNumber, message,
|
|
number, procedure,
|
|
server, source, state);
|
|
Add(error);
|
|
}
|
|
|
|
#region Destructors
|
|
|
|
[MonoTODO]
|
|
~SqlErrorCollection()
|
|
{
|
|
// FIXME: do the destructor - release resources
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|