1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Data.Common;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.SqlServer.Server;
namespace System.Data.SqlClient
{
public sealed partial class SqlCommand : DbCommand, ICloneable
{
const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlCommand is not supported on the current platform.";
internal SqlDependency _sqlDep;
internal int _rowsAffected = -1;
internal bool InPrepare
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public SqlCommand() : base() => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public SqlCommand(string cmdText) : this() {}
public SqlCommand(string cmdText, SqlConnection connection) : this() {}
public SqlCommand(string cmdText, SqlConnection connection, SqlTransaction transaction) : this() {}
new public SqlConnection Connection {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
override protected DbConnection DbConnection {
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);
}
internal SqlStatistics Statistics
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public SqlTransaction Transaction {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
override protected DbTransaction DbTransaction {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
override public string CommandText {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
override public int CommandTimeout {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public void ResetCommandTimeout()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override public CommandType CommandType {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
#if DEBUG
internal static int DebugForceAsyncWriteDelay {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
#endif
public override bool DesignTimeVisible {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
new public SqlParameterCollection Parameters
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override protected DbParameterCollection DbParameterCollection
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override public UpdateRowSource UpdatedRowSource {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public event StatementCompletedEventHandler StatementCompleted;
internal void OnStatementCompleted(int recordCount)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override public void Prepare()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void Unprepare()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override public void Cancel()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public SqlParameter CreateParameter()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override protected DbParameter CreateDbParameter()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override protected void Dispose(bool disposing) {}
override public object ExecuteScalar()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override public int ExecuteNonQuery()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public XmlReader ExecuteXmlReader()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
override protected DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public SqlDataReader ExecuteReader()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public SqlDataReader ExecuteReader(CommandBehavior behavior)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal SqlDataReader EndExecuteReader(IAsyncResult asyncResult)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal IAsyncResult BeginExecuteReader(CommandBehavior behavior, AsyncCallback callback, object stateObject)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public override Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
protected override Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public Task<SqlDataReader> ExecuteReaderAsync()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public Task<SqlDataReader> ExecuteReaderAsync(CancellationToken cancellationToken)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
new public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public override Task<object> ExecuteScalarAsync(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);
internal static readonly string[] PreKatmaiProcParamsNames = new string[] {};
internal static readonly string[] KatmaiProcParamsNames = new string[] {};
internal void DeriveParameters()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal _SqlMetaDataSet MetaData
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal SqlDataReader RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, bool returnStream, [CallerMemberName] string method = "")
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal SqlDataReader RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, bool returnStream, TaskCompletionSource<object> completion, int timeout, out Task task, bool asyncWrite = false, [CallerMemberName] string method = "")
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void OnDoneProc()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void OnReturnStatus(int status)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void OnReturnValue(SqlReturnValue rec, TdsParserStateObject stateObj)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal string BuildParamList(TdsParser parser, SqlParameterCollection parameters)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void CheckThrowSNIException()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void OnConnectionClosed()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal TdsParserStateObject StateObject
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal bool IsDirty {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
internal int InternalRecordsAffected {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
internal void ClearBatchCommand()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal bool BatchRPCMode {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
internal void AddBatchCommand(string commandText, SqlParameterCollection parameters, CommandType cmdType)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal int ExecuteBatchRPCCommand()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal int? GetRecordsAffected(int commandIndex)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal SqlException GetErrors(int commandIndex)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
#if DEBUG
internal void CompletePendingReadWithSuccess(bool resetForcePendingReadsToWait)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
internal void CompletePendingReadWithFailure(int errorCode, bool resetForcePendingReadsToWait)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
#endif
internal void CancelIgnoreFailure()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
object ICloneable.Clone()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public SqlCommand Clone()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public bool NotificationAutoEnlist {
get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public IAsyncResult BeginExecuteNonQuery()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public IAsyncResult BeginExecuteXmlReader()
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
public IAsyncResult BeginExecuteReader()
=> 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 IAsyncResult BeginExecuteReader(CommandBehavior behavior)
=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
}
|