2 // SqlParameterCollection.cs
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
28 using System.Collections;
30 using System.Data.Common;
31 using System.Data.SqlClient;
33 namespace System.Data.SqlClient
35 public class SqlParameterCollection : DbParameterCollection , IDataParameterCollection, IList, ICollection, IEnumerable
37 const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameterCollection is not supported on the current platform.";
39 SqlParameterCollection () {}
41 protected override DbParameter GetParameter (int index)
43 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
46 protected override DbParameter GetParameter (string parameterName)
48 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
51 protected override void SetParameter (int index, DbParameter value)
53 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
56 protected override void SetParameter (string parameterName, DbParameter value)
58 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
61 public override int Add (object value)
63 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
66 public SqlParameter Add (SqlParameter value)
68 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
71 public SqlParameter Add (string parameterName, object value)
73 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
76 public SqlParameter AddWithValue (string parameterName, object value)
78 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
81 public SqlParameter Add (string parameterName, SqlDbType sqlDbType)
83 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
86 public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size)
88 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
91 public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size, string sourceColumn)
93 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
96 public override void Clear ()
98 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
101 public override bool Contains (object value)
103 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
106 public override bool Contains (string value)
108 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
111 public bool Contains (SqlParameter value)
113 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
116 public override void CopyTo (Array array, int index)
118 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
121 public override IEnumerator GetEnumerator ()
123 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
126 public override int IndexOf (object value)
128 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
131 public override int IndexOf (string parameterName)
133 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
136 public int IndexOf (SqlParameter value)
138 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
141 public override void Insert (int index, object value)
143 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
146 public void Insert (int index, SqlParameter value)
148 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
151 public override void Remove (object value)
153 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
156 public void Remove (SqlParameter value)
158 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
161 public override void RemoveAt (int index)
163 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
166 public override void RemoveAt (string parameterName)
168 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
171 public override void AddRange (Array values)
173 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
176 public void AddRange (SqlParameter [] values)
178 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
181 public void CopyTo (SqlParameter [] array, int index)
183 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
186 public override int Count {
187 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
190 public override bool IsFixedSize {
191 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
194 public override bool IsReadOnly {
195 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
198 public override bool IsSynchronized {
199 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
202 public override object SyncRoot {
203 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
206 public SqlParameter this [int index] {
207 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
208 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
211 public SqlParameter this [string parameterName] {
212 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
213 set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }