You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@@ -12,11 +12,17 @@ LIB_MCS_FLAGS = \
|
||||
-d:MONO_PARTIAL_DATA_IMPORT \
|
||||
-unsafe
|
||||
|
||||
ifdef NO_MONO_SECURITY
|
||||
MONO_DATA_TDS=
|
||||
else
|
||||
MONO_DATA_TDS=Mono.Data.Tds
|
||||
endif
|
||||
|
||||
ifdef MOBILE_PROFILE
|
||||
LIB_REFS += Mono.Data.Tds System.Transactions
|
||||
LIB_REFS += $(MONO_DATA_TDS) System.Transactions
|
||||
LIB_MCS_FLAGS += -d:NO_CODEDOM -d:NO_OLEDB -d:NO_ODBC -d:NO_CONFIGURATION
|
||||
else
|
||||
LIB_REFS += System.EnterpriseServices Mono.Data.Tds System.Configuration System.Transactions
|
||||
LIB_REFS += System.EnterpriseServices $(MONO_DATA_TDS) System.Configuration System.Transactions
|
||||
BUILT_SOURCES = \
|
||||
gen_OdbcConnection.cs \
|
||||
gen_OleDbConnection.cs \
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public enum PoolBlockingPeriod
|
||||
{
|
||||
Auto,
|
||||
AlwaysBlock,
|
||||
NeverBlock
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
1fce5dcce82839c44d1805b58f449849591dc318
|
||||
c103d0d1e3bf658a2717757fb01d2e7b56405504
|
||||
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// SqlBulkCopy.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System.Data.Common;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
public sealed class SqlBulkCopy : IDisposable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlBulkCopy is not supported on the current platform.";
|
||||
|
||||
public SqlBulkCopy (SqlConnection connection)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlBulkCopy (string connectionString)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlBulkCopy (string connectionString, SqlBulkCopyOptions copyOptions)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlBulkCopy (SqlConnection connection, SqlBulkCopyOptions copyOptions, SqlTransaction externalTransaction)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public int BatchSize {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int BulkCopyTimeout {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlBulkCopyColumnMappingCollection ColumnMappings {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string DestinationTableName {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public bool EnableStreaming {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int NotifyAfter {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void WriteToServer (DataRow [] rows)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void WriteToServer (DataTable table)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void WriteToServer (IDataReader reader)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void WriteToServer (DataTable table, DataRowState rowState)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void WriteToServer (DbDataReader reader)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public Task WriteToServerAsync (DbDataReader reader)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public Task WriteToServerAsync (DbDataReader reader, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
private void RowsCopied (long rowsCopied)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public event SqlRowsCopiedEventHandler SqlRowsCopied;
|
||||
|
||||
void IDisposable.Dispose ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -510,40 +510,104 @@ namespace System.Data.SqlClient {
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return ExecuteReaderAsync (CommandBehavior.Default, CancellationToken.None);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return ExecuteReaderAsync (behavior, CancellationToken.None);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return ExecuteReaderAsync (CommandBehavior.Default, CancellationToken.None);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
TaskCompletionSource<SqlDataReader> source = new TaskCompletionSource<SqlDataReader>();
|
||||
|
||||
CancellationTokenRegistration registration = new CancellationTokenRegistration();
|
||||
if (cancellationToken.CanBeCanceled) {
|
||||
if (cancellationToken.IsCancellationRequested) {
|
||||
source.SetCanceled();
|
||||
return source.Task;
|
||||
}
|
||||
registration = cancellationToken.Register(CancelIgnoreFailure);
|
||||
}
|
||||
|
||||
Task<SqlDataReader> returnedTask = source.Task;
|
||||
try {
|
||||
// TODO: RegisterForConnectionCloseNotification(ref returnedTask);
|
||||
|
||||
Task<SqlDataReader>.Factory.FromAsync(BeginExecuteReaderAsync, EndExecuteReader, behavior, null).ContinueWith((t) => {
|
||||
registration.Dispose();
|
||||
if (t.IsFaulted) {
|
||||
Exception e = t.Exception.InnerException;
|
||||
source.SetException(e);
|
||||
}
|
||||
else {
|
||||
if (t.IsCanceled) {
|
||||
source.SetCanceled();
|
||||
}
|
||||
else {
|
||||
source.SetResult(t.Result);
|
||||
}
|
||||
}
|
||||
}, TaskScheduler.Default);
|
||||
}
|
||||
catch (Exception e) {
|
||||
source.SetException(e);
|
||||
}
|
||||
|
||||
return returnedTask;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Task<XmlReader> ExecuteXmlReaderAsync ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return ExecuteXmlReaderAsync (CancellationToken.None);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Task<XmlReader> ExecuteXmlReaderAsync (CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
TaskCompletionSource<XmlReader> source = new TaskCompletionSource<XmlReader>();
|
||||
|
||||
CancellationTokenRegistration registration = new CancellationTokenRegistration();
|
||||
if (cancellationToken.CanBeCanceled) {
|
||||
if (cancellationToken.IsCancellationRequested) {
|
||||
source.SetCanceled();
|
||||
return source.Task;
|
||||
}
|
||||
registration = cancellationToken.Register(CancelIgnoreFailure);
|
||||
}
|
||||
|
||||
Task<XmlReader> returnedTask = source.Task;
|
||||
try {
|
||||
// TODO: RegisterForConnectionCloseNotification(ref returnedTask);
|
||||
|
||||
Task<XmlReader>.Factory.FromAsync(BeginExecuteXmlReader, EndExecuteXmlReader, null).ContinueWith((t) => {
|
||||
registration.Dispose();
|
||||
if (t.IsFaulted) {
|
||||
Exception e = t.Exception.InnerException;
|
||||
source.SetException(e);
|
||||
}
|
||||
else {
|
||||
if (t.IsCanceled) {
|
||||
source.SetCanceled();
|
||||
}
|
||||
else {
|
||||
source.SetResult(t.Result);
|
||||
}
|
||||
}
|
||||
}, TaskScheduler.Default);
|
||||
}
|
||||
catch (Exception e) {
|
||||
source.SetException(e);
|
||||
}
|
||||
|
||||
return returnedTask;
|
||||
}
|
||||
|
||||
public
|
||||
@@ -846,6 +910,11 @@ namespace System.Data.SqlClient {
|
||||
return BeginExecuteReader (callback, stateObject, CommandBehavior.Default);
|
||||
}
|
||||
|
||||
IAsyncResult BeginExecuteReaderAsync(CommandBehavior behavior, AsyncCallback callback, object stateObject)
|
||||
{
|
||||
return BeginExecuteReader (callback, stateObject, behavior);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteReader (AsyncCallback callback, object stateObject, CommandBehavior behavior)
|
||||
{
|
||||
ValidateCommand ("BeginExecuteReader", true);
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
//
|
||||
// SqlCommand.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System.Data.Common;
|
||||
using System.Data.Sql;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
|
||||
namespace System.Data.SqlClient {
|
||||
public sealed class SqlCommand : DbCommand, IDbCommand, ICloneable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlCommand is not supported on the current platform.";
|
||||
|
||||
public SqlCommand()
|
||||
: this (String.Empty, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText)
|
||||
: this (cmdText, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection)
|
||||
: this (cmdText, connection, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlCommand (string cmdText, SqlConnection connection, SqlTransaction transaction)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string CommandText {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int CommandTimeout {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override CommandType CommandType {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public new SqlConnection Connection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool DesignTimeVisible {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public new SqlParameterCollection Parameters {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public new SqlTransaction Transaction {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override UpdateRowSource UpdatedRowSource {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlNotificationRequest Notification {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public bool NotificationAutoEnlist {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override void Cancel ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand Clone ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new SqlParameter CreateParameter ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int ExecuteNonQuery ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new SqlDataReader ExecuteReader ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new SqlDataReader ExecuteReader (CommandBehavior behavior)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public Task<XmlReader> ExecuteXmlReaderAsync ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public Task<XmlReader> ExecuteXmlReaderAsync (CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override object ExecuteScalar ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public XmlReader ExecuteXmlReader ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
object ICloneable.Clone ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Prepare ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void ResetCommandTimeout ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbParameter CreateDbParameter ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbDataReader ExecuteDbDataReader (CommandBehavior behavior)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbConnection DbConnection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
protected override DbParameterCollection DbParameterCollection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
protected override DbTransaction DbTransaction {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteNonQuery ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteNonQuery (AsyncCallback callback, object stateObject)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public int EndExecuteNonQuery (IAsyncResult asyncResult)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteReader ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteReader (CommandBehavior behavior)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteReader (AsyncCallback callback, object stateObject)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteReader (AsyncCallback callback, object stateObject, CommandBehavior behavior)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlDataReader EndExecuteReader (IAsyncResult asyncResult)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteXmlReader (AsyncCallback callback, object stateObject)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginExecuteXmlReader ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public XmlReader EndExecuteXmlReader (IAsyncResult asyncResult)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public event StatementCompletedEventHandler StatementCompleted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// SqlCommandBuilder.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlCommandBuilder : DbCommandBuilder
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlCommandBuilder is not supported on the current platform.";
|
||||
|
||||
public SqlCommandBuilder ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommandBuilder (SqlDataAdapter adapter)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public static void DeriveParameters (SqlCommand command)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetDeleteCommand ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetInsertCommand ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetUpdateCommand ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetUpdateCommand (bool useColumnsForParameterNames)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetDeleteCommand (bool useColumnsForParameterNames)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlCommand GetInsertCommand (bool useColumnsForParameterNames)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string QuoteIdentifier (string unquotedIdentifier)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string UnquoteIdentifier (string quotedIdentifier)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void ApplyParameterInfo (DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override string GetParameterName (int parameterOrdinal)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override string GetParameterName (string parameterName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override string GetParameterPlaceholder (int parameterOrdinal)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void SetRowUpdatingHandler (DbDataAdapter adapter)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DataTable GetSchemaTable (DbCommand srcCommand)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbCommand InitializeCommand (DbCommand command)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlDataAdapter DataAdapter {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string QuotePrefix {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string QuoteSuffix {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string CatalogSeparator {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string SchemaSeparator {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override CatalogLocation CatalogLocation {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -928,7 +928,11 @@ namespace System.Data.SqlClient
|
||||
|
||||
if (Client.Available <= 0)
|
||||
return -1; // Error
|
||||
IPEndPoint endpoint = new IPEndPoint (Dns.GetHostEntry ("localhost").AddressList [0], 0);
|
||||
|
||||
IPEndPoint endpoint = CreateLocalEndpoint ();
|
||||
if (endpoint == null)
|
||||
return -1;
|
||||
|
||||
Byte [] rawrs;
|
||||
|
||||
rawrs = Receive (ref endpoint);
|
||||
@@ -953,6 +957,16 @@ namespace System.Data.SqlClient
|
||||
|
||||
return SqlServerTcpPort;
|
||||
}
|
||||
|
||||
IPEndPoint CreateLocalEndpoint ()
|
||||
{
|
||||
foreach (var addr in Dns.GetHostEntry ("localhost").AddressList) {
|
||||
if (addr.AddressFamily == Client.AddressFamily)
|
||||
return new IPEndPoint (addr, 0);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
struct ColumnInfo
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
//
|
||||
// SqlConnection.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System.Collections;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public sealed class SqlConnection : DbConnection, IDbConnection, ICloneable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlConnection is not supported on the current platform.";
|
||||
|
||||
public SqlConnection () : this (null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlConnection (string connectionString)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlConnection (string connectionString, SqlCredential cred)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string ConnectionString {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlCredential Credentials {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public Guid ClientConnectionId {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int ConnectionTimeout {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string Database {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string DataSource {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int PacketSize {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string ServerVersion {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override ConnectionState State {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string WorkstationId {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public bool FireInfoMessageEventOnUserErrors {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public bool StatisticsEnabled {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
protected override DbProviderFactory DbProviderFactory {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public event SqlInfoMessageEventHandler InfoMessage;
|
||||
|
||||
public new SqlTransaction BeginTransaction ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new SqlTransaction BeginTransaction (IsolationLevel iso)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction (string transactionName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlTransaction BeginTransaction (IsolationLevel iso, string transactionName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void ChangeDatabase (string database)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Close ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public new SqlCommand CreateCommand ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
public void EnlistDistributedTransaction (ITransaction transaction)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
#endif
|
||||
|
||||
object ICloneable.Clone ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbTransaction BeginDbTransaction (IsolationLevel isolationLevel)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbCommand CreateDbCommand ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Open ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DataTable GetSchema ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DataTable GetSchema (String collectionName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DataTable GetSchema (String collectionName, string [] restrictionValues)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public static void ChangePassword (string connectionString, string newPassword)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public static void ClearAllPools ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public static void ClearPool (SqlConnection connection)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void ResetStatistics ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public IDictionary RetrieveStatistics ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
//
|
||||
// SqlDataReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlDataReader : DbDataReader , IDataReader, IDisposable, IDataRecord
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlDataReader is not supported on the current platform.";
|
||||
|
||||
SqlDataReader () {}
|
||||
|
||||
protected bool IsCommandBehavior (CommandBehavior condition)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Close ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool GetBoolean (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override byte GetByte (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override long GetBytes (int i, long dataIndex, byte [] buffer, int bufferIndex, int length)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override char GetChar (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override long GetChars (int i, long dataIndex, char [] buffer, int bufferIndex, int length)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string GetDataTypeName (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DateTime GetDateTime (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual DateTimeOffset GetDateTimeOffset (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual TimeSpan GetTimeSpan (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlChars GetSqlChars (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Decimal GetDecimal (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Double GetDouble (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Type GetFieldType (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Single GetFloat (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Guid GetGuid (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override short GetInt16 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int GetInt32 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override long GetInt64 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string GetName (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int GetOrdinal (string name)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DataTable GetSchemaTable ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlBinary GetSqlBinary (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlBoolean GetSqlBoolean (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlByte GetSqlByte (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlDateTime GetSqlDateTime (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlDecimal GetSqlDecimal (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlDouble GetSqlDouble (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlGuid GetSqlGuid (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlInt16 GetSqlInt16 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlInt32 GetSqlInt32 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlInt64 GetSqlInt64 (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlMoney GetSqlMoney (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlSingle GetSqlSingle (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlString GetSqlString (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlXml GetSqlXml (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual object GetSqlValue (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual int GetSqlValues (object [] values)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override string GetString (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override object GetValue (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int GetValues (object [] values)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override IEnumerator GetEnumerator ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool IsDBNull (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool NextResult ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool Read ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Type GetProviderSpecificFieldType (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override object GetProviderSpecificValue (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int GetProviderSpecificValues (object [] values)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual SqlBytes GetSqlBytes (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override T GetFieldValue<T> (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public virtual XmlReader GetXmlReader (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Task<T> GetFieldValueAsync<T> (int i, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Stream GetStream (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override TextReader GetTextReader (int i)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override Task<bool> IsDBNullAsync (int i, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int Depth {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int FieldCount {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool IsClosed {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override object this [int i] {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override object this [string name] {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int RecordsAffected {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool HasRows {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int VisibleFieldCount {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
protected SqlConnection Connection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// SqlException.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlException : DbException
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlException is not supported on the current platform.";
|
||||
|
||||
internal bool _doNotReconnect;
|
||||
|
||||
static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion, SqlInternalConnectionTds internalConnection, Exception innerException = null)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion, Guid conId, Exception innerException = null)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
SqlException () {}
|
||||
|
||||
public override void GetObjectData (SerializationInfo si, StreamingContext context)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public byte Class {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public Guid ClientConnectionId {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlErrorCollection Errors {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int LineNumber {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string Message {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int Number {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string Procedure {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string Server {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string Source {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public byte State {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// SqlParameter.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlTypes;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlParameter : DbParameter , IDbDataParameter, IDataParameter, ICloneable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameter is not supported on the current platform.";
|
||||
|
||||
public SqlParameter ()
|
||||
: this (String.Empty, SqlDbType.NVarChar, 0, ParameterDirection.Input, false, 0, 0, String.Empty, DataRowVersion.Current, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, SqlDbType dbType)
|
||||
: this (parameterName, dbType, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, SqlDbType dbType, int size)
|
||||
: this (parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, SqlDbType dbType, int size, string sourceColumn)
|
||||
: this (parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, sourceColumn, DataRowVersion.Current, null)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, SqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter (string parameterName, SqlDbType dbType, int size, ParameterDirection direction, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, bool sourceColumnNullMapping, Object value, string xmlSchemaCollectionDatabase, string xmlSchemaCollectionOwningSchema, string xmlSchemaCollectionName)
|
||||
: this (parameterName, dbType, size, direction, false, precision, scale, sourceColumn, sourceVersion, value)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void ResetDbType ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void ResetSqlDbType ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override DbType DbType {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override ParameterDirection Direction {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool IsNullable {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int Offset {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string ParameterName {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public byte Precision {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public byte Scale {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override int Size {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override string SourceColumn {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override DataRowVersion SourceVersion {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlDbType SqlDbType {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override object Value {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlCompareOptions CompareInfo {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public int LocaleId {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public object SqlValue {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool SourceColumnNullMapping {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string XmlSchemaCollectionDatabase {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string XmlSchemaCollectionName {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string XmlSchemaCollectionOwningSchema {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string UdtTypeName {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public string TypeName {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
object ICloneable.Clone ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
//
|
||||
// SqlParameterCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlParameterCollection : DbParameterCollection , IDataParameterCollection, IList, ICollection, IEnumerable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameterCollection is not supported on the current platform.";
|
||||
|
||||
SqlParameterCollection () {}
|
||||
|
||||
protected override DbParameter GetParameter (int index)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override DbParameter GetParameter (string parameterName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void SetParameter (int index, DbParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void SetParameter (string parameterName, DbParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int Add (object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter Add (SqlParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter Add (string parameterName, object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter AddWithValue (string parameterName, object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter Add (string parameterName, SqlDbType sqlDbType)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size, string sourceColumn)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Clear ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool Contains (object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override bool Contains (string value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public bool Contains (SqlParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void CopyTo (Array array, int index)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override IEnumerator GetEnumerator ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int IndexOf (object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int IndexOf (string parameterName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public int IndexOf (SqlParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Insert (int index, object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void Insert (int index, SqlParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Remove (object value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void Remove (SqlParameter value)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void RemoveAt (int index)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void RemoveAt (string parameterName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void AddRange (Array values)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void AddRange (SqlParameter [] values)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void CopyTo (SqlParameter [] array, int index)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override int Count {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool IsFixedSize {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool IsReadOnly {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override bool IsSynchronized {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override object SyncRoot {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlParameter this [int index] {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public SqlParameter this [string parameterName] {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// SqlTransaction.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge <rolf@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2016 Xamarin, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace System.Data.SqlClient
|
||||
{
|
||||
public class SqlTransaction : DbTransaction , IDbTransaction, IDisposable
|
||||
{
|
||||
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlTransaction is not supported on the current platform.";
|
||||
|
||||
SqlTransaction () {}
|
||||
|
||||
public override void Commit ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public override void Rollback ()
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void Rollback (string transactionName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public void Save (string savePointName)
|
||||
{
|
||||
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public SqlConnection Connection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
public override IsolationLevel IsolationLevel {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
|
||||
protected override DbConnection DbConnection {
|
||||
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,14 @@ namespace MonoTests.System.Data.Common
|
||||
try {
|
||||
da.AddToBatch (new SqlCommand ());
|
||||
Assert.Fail ("#1");
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
} catch (PlatformNotSupportedException) {
|
||||
#else
|
||||
} catch (NotSupportedException ex) {
|
||||
Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2");
|
||||
Assert.IsNull (ex.InnerException, "#3");
|
||||
Assert.IsNotNull (ex.Message, "#4");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace MonoTests.System.Data.Common
|
||||
{
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
public void GetFieldValueTest ()
|
||||
{
|
||||
@@ -155,7 +154,6 @@ namespace MonoTests.System.Data.Common
|
||||
Assert.IsFalse (dataReader.Read (), "#5");
|
||||
}
|
||||
|
||||
#endif //NET_4_5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,21 +39,33 @@ namespace MonoTests.System.Data.SqlClient {
|
||||
private const string testFailParamNameMessage = "We have to provide the same parameter name as in original .NET";
|
||||
|
||||
[Test] // .ctor(SqlConnection connection)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull1 ()
|
||||
{
|
||||
new SqlBulkCopy ((SqlConnection)null);
|
||||
}
|
||||
|
||||
[Test] // .ctor(string connectionString)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull2 ()
|
||||
{
|
||||
new SqlBulkCopy ((string)null);
|
||||
}
|
||||
|
||||
[Test] // .ctor(SqlConnection connection)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull3 ()
|
||||
{
|
||||
try {
|
||||
@@ -65,7 +77,11 @@ namespace MonoTests.System.Data.SqlClient {
|
||||
}
|
||||
|
||||
[Test] // .ctor(string connectionString)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull4 ()
|
||||
{
|
||||
try {
|
||||
@@ -77,7 +93,11 @@ namespace MonoTests.System.Data.SqlClient {
|
||||
}
|
||||
|
||||
[Test] // .ctor(string connectionString)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull5 ()
|
||||
{
|
||||
try {
|
||||
@@ -89,7 +109,11 @@ namespace MonoTests.System.Data.SqlClient {
|
||||
}
|
||||
|
||||
[Test] // .ctor(string connectionString)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#else
|
||||
[ExpectedException (typeof(ArgumentNullException))]
|
||||
#endif
|
||||
public void ConstructorNotNull6 ()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
public class SqlCommandBuilderTest
|
||||
{
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CatalogLocationTest ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -47,6 +50,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CatalogLocation_Value_Invalid ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -82,6 +88,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CatalogSeparator ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -89,6 +98,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CatalogSeparator_Value_Invalid ()
|
||||
{
|
||||
string [] separators = new string [] {
|
||||
@@ -118,6 +130,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConflictOptionTest ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -127,6 +142,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConflictOption_Value_Invalid ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -147,6 +165,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test] // QuoteIdentifier (String)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuoteIdentifier ()
|
||||
{
|
||||
SqlCommandBuilder cb;
|
||||
@@ -173,6 +194,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuoteIdentifier_PrefixSuffix_NoMatch ()
|
||||
{
|
||||
SqlCommandBuilder cb;
|
||||
@@ -211,6 +235,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test] // QuoteIdentifier (String)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuoteIdentifier_UnquotedIdentifier_Null ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -226,6 +253,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuotePrefix ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -240,6 +270,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuotePrefix_Value_Invalid ()
|
||||
{
|
||||
string [] prefixes = new string [] {
|
||||
@@ -268,6 +301,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuoteSuffix ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -282,6 +318,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void QuoteSuffix_Value_Invalid ()
|
||||
{
|
||||
string [] suffixes = new string [] {
|
||||
@@ -310,6 +349,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void SchemaSeparator ()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder ();
|
||||
@@ -319,6 +361,9 @@ namespace MonoTests.System.Data.Odbc
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void SchemaSeparator_Value_Invalid ()
|
||||
{
|
||||
string [] separators = new string [] {
|
||||
|
||||
@@ -42,6 +42,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
const string COMMAND_TEXT = "SELECT * FROM Authors";
|
||||
|
||||
[Test] // SqlCommand ()
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor1 ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -61,6 +64,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // SqlCommand (string)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor2 ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand (COMMAND_TEXT);
|
||||
@@ -95,6 +101,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // SqlCommand (string, SqlConnection)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor3 ()
|
||||
{
|
||||
SqlConnection conn = new SqlConnection ();
|
||||
@@ -147,6 +156,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // SqlCommand (string, SqlConnection, SqlTransaction)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor4 ()
|
||||
{
|
||||
SqlConnection conn = new SqlConnection ();
|
||||
@@ -199,6 +211,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Clone ()
|
||||
{
|
||||
SqlNotificationRequest notificationReq = new SqlNotificationRequest ();
|
||||
@@ -237,6 +252,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CommandText ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -251,6 +269,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CommandTimeout ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -263,6 +284,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CommandTimeout_Value_Negative ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -279,6 +303,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CommandType_Value_Invalid ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -296,6 +323,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // bug #324386
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Dispose ()
|
||||
{
|
||||
string connectionString = "Initial Catalog=a;Server=b;User ID=c;"
|
||||
@@ -307,6 +337,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteNonQuery_Connection_Closed ()
|
||||
{
|
||||
string connectionString = "Initial Catalog=a;Server=b;User ID=c;"
|
||||
@@ -329,6 +362,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteNonQuery_Connection_Null ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ("delete from whatever");
|
||||
@@ -346,6 +382,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteReader_Connection_Closed ()
|
||||
{
|
||||
string connectionString = "Initial Catalog=a;Server=b;User ID=c;"
|
||||
@@ -368,6 +407,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteReader_Connection_Null ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ("select * from whatever");
|
||||
@@ -385,6 +427,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteScalar_Connection_Closed ()
|
||||
{
|
||||
string connectionString = "Initial Catalog=a;Server=b;User ID=c;"
|
||||
@@ -407,6 +452,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // bug #412584
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ExecuteScalar_Connection_Null ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ("select count(*) from whatever");
|
||||
@@ -425,6 +473,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
|
||||
// FIXME: this actually doesn't match .NET behavior. It shouldn't throw NRE.
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Prepare_Connection_Null ()
|
||||
{
|
||||
SqlCommand cmd;
|
||||
@@ -477,6 +528,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // bug #412586
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Prepare_Connection_Closed ()
|
||||
{
|
||||
string connectionString = "Initial Catalog=a;Server=b;User ID=c;"
|
||||
@@ -527,6 +581,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ResetCommandTimeout ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -537,6 +594,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void UpdatedRowSource ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -547,6 +607,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void UpdatedRowSource_Value_Invalid ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand ();
|
||||
@@ -565,6 +628,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
|
||||
|
||||
[Test] // bug #381100
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ParameterCollectionTest ()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
public class SqlConnectionTest
|
||||
{
|
||||
[Test] // SqlConnection ()
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor1 ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -57,6 +60,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test] // SqlConnection (string)
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor2 ()
|
||||
{
|
||||
string connectionString = "server=SQLSRV; database=Mono;";
|
||||
@@ -89,6 +95,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Constructor2_ConnectionString_Invalid ()
|
||||
{
|
||||
try {
|
||||
@@ -181,6 +190,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void BeginTransaction_Connection_Closed ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -247,6 +259,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangeDatabase_Connection_Closed ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -264,6 +279,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangePassword_ConnectionString_Empty ()
|
||||
{
|
||||
try {
|
||||
@@ -279,6 +297,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangePassword_ConnectionString_Null ()
|
||||
{
|
||||
try {
|
||||
@@ -293,7 +314,10 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangePassword_NewPassword_Empty ()
|
||||
{
|
||||
try {
|
||||
@@ -309,6 +333,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangePassword_NewPassword_ExceedMaxLength ()
|
||||
{
|
||||
try {
|
||||
@@ -328,6 +355,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ChangePassword_NewPassword_Null ()
|
||||
{
|
||||
try {
|
||||
@@ -343,6 +373,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ClearPool_Connection_Null ()
|
||||
{
|
||||
try {
|
||||
@@ -357,6 +390,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -371,6 +407,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_Value_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -403,6 +442,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void CreateCommand ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -424,6 +466,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Dispose ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ("Server=SQLSRV;Database=master;Timeout=25;Packet Size=512;Workstation ID=DUMMY");
|
||||
@@ -443,6 +488,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void GetSchema_Connection_Closed ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -519,6 +567,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_AsynchronousProcessing ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -527,6 +578,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_ConnectTimeout ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -543,6 +597,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_ConnectTimeout_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -600,6 +657,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_Database_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = null;
|
||||
@@ -614,6 +674,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_DataSource_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = null;
|
||||
@@ -640,6 +703,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MaxPoolSize ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -649,6 +715,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MaxPoolSize_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -733,6 +802,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MinPoolSize ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -742,6 +814,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MinPoolSize_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -799,6 +874,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MultipleActiveResultSets ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -806,6 +884,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_MultipleActiveResultSets_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -823,6 +904,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_NetworkLibrary_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -832,6 +916,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_PacketSize ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -848,6 +935,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_PacketSize_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -901,6 +991,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_Password_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -909,6 +1002,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_PersistSecurityInfo_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -917,6 +1013,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_UserID_Synonyms ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -926,6 +1025,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_UserInstance ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -933,6 +1035,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_UserInstance_Invalid ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -950,6 +1055,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ConnectionString_OtherKeywords ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -973,6 +1081,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Open_ConnectionString_Empty ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -991,6 +1102,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Open_ConnectionString_Null ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -1009,6 +1123,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void Open_ConnectionString_Whitespace ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -1027,6 +1144,9 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void ServerVersion_Connection_Closed ()
|
||||
{
|
||||
SqlConnection cn = new SqlConnection ();
|
||||
@@ -1051,3 +1171,4 @@ namespace MonoTests.System.Data.SqlClient
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user