5 // Rolf Bjarne Kvinge <rolf@xamarin.com>
7 // Copyright (c) 2016 Xamarin, Inc.
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29 using System.Data.Common;
30 using System.Data.SqlTypes;
32 namespace System.Data.SqlClient
34 public class SqlParameter : DbParameter , IDbDataParameter, IDataParameter, ICloneable
36 const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameter is not supported on the current platform.";
38 public SqlParameter ()
39 : this (String.Empty, SqlDbType.NVarChar, 0, ParameterDirection.Input, false, 0, 0, String.Empty, DataRowVersion.Current, null)
43 public SqlParameter (string parameterName, object value)
45 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
48 public SqlParameter (string parameterName, SqlDbType dbType)
49 : this (parameterName, dbType, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, null)
53 public SqlParameter (string parameterName, SqlDbType dbType, int size)
54 : this (parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, null)
58 public SqlParameter (string parameterName, SqlDbType dbType, int size, string sourceColumn)
59 : this (parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, sourceColumn, DataRowVersion.Current, null)
63 public SqlParameter (string parameterName, SqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value)
65 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
68 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)
69 : this (parameterName, dbType, size, direction, false, precision, scale, sourceColumn, sourceVersion, value)
73 public override string ToString ()
75 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
78 public override void ResetDbType ()
80 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
83 public void ResetSqlDbType ()
85 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
88 public override DbType DbType {
89 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
90 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
93 public override ParameterDirection Direction {
94 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
95 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
98 public override bool IsNullable {
99 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
100 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
104 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
105 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
108 public override string ParameterName {
109 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
110 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
113 public byte Precision {
114 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
115 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
119 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
120 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
123 public override int Size {
124 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
125 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
128 public override string SourceColumn {
129 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
130 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
133 public override DataRowVersion SourceVersion {
134 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
135 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
138 public SqlDbType SqlDbType {
139 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
140 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
143 public override object Value {
144 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
145 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
148 public SqlCompareOptions CompareInfo {
149 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
150 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
153 public int LocaleId {
154 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
155 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
158 public object SqlValue {
159 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
160 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
163 public override bool SourceColumnNullMapping {
164 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
165 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
168 public string XmlSchemaCollectionDatabase {
169 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
170 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
173 public string XmlSchemaCollectionName {
174 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
175 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
178 public string XmlSchemaCollectionOwningSchema {
179 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
180 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
183 public string UdtTypeName {
184 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
185 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
188 public string TypeName {
189 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
190 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
193 object ICloneable.Clone ()
195 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);