[System*] Throw a PlatformNotSupported exception when using the managed networking...
[mono.git] / mcs / class / System.Data / System.Data.SqlClient / SqlParameterCollection.platformnotsupported.cs
1 //
2 // SqlParameterCollection.cs
3 //
4 // Author:
5 //       Rolf Bjarne Kvinge <rolf@xamarin.com>
6 //
7 // Copyright (c) 2016 Xamarin, Inc.
8 //
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:
15 //
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
18 //
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
25 // THE SOFTWARE.
26
27 using System;
28 using System.Collections;
29 using System.Data;
30 using System.Data.Common;
31 using System.Data.SqlClient;
32
33 namespace System.Data.SqlClient
34 {
35         public class SqlParameterCollection : DbParameterCollection , IDataParameterCollection, IList, ICollection, IEnumerable
36         {
37                 const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameterCollection is not supported on the current platform.";
38
39                 SqlParameterCollection () {}
40
41                 protected override DbParameter GetParameter (int index)
42                 {
43                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
44                 }
45
46                 protected override DbParameter GetParameter (string parameterName)
47                 {
48                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
49                 }
50
51                 protected override void SetParameter (int index, DbParameter value)
52                 {
53                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
54                 }
55
56                 protected override void SetParameter (string parameterName, DbParameter value)
57                 {
58                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
59                 }
60
61                 public override int Add (object value)
62                 {
63                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
64                 }
65
66                 public SqlParameter Add (SqlParameter value)
67                 {
68                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
69                 }
70
71                 public SqlParameter Add (string parameterName, object value)
72                 {
73                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
74                 }
75
76                 public SqlParameter AddWithValue (string parameterName, object value)
77                 {
78                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
79                 }
80
81                 public SqlParameter Add (string parameterName, SqlDbType sqlDbType)
82                 {
83                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
84                 }
85
86                 public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size)
87                 {
88                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
89                 }
90
91                 public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size, string sourceColumn)
92                 {
93                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
94                 }
95
96                 public override void Clear ()
97                 {
98                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
99                 }
100
101                 public override bool Contains (object value)
102                 {
103                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
104                 }
105
106                 public override bool Contains (string value)
107                 {
108                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
109                 }
110
111                 public bool Contains (SqlParameter value)
112                 {
113                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
114                 }
115
116                 public override void CopyTo (Array array, int index)
117                 {
118                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
119                 }
120
121                 public override IEnumerator GetEnumerator ()
122                 {
123                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
124                 }
125
126                 public override int IndexOf (object value)
127                 {
128                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
129                 }
130
131                 public override int IndexOf (string parameterName)
132                 {
133                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
134                 }
135
136                 public int IndexOf (SqlParameter value)
137                 {
138                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
139                 }
140
141                 public override void Insert (int index, object value)
142                 {
143                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
144                 }
145
146                 public void Insert (int index, SqlParameter value)
147                 {
148                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
149                 }
150
151                 public override void Remove (object value)
152                 {
153                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
154                 }
155
156                 public void Remove (SqlParameter value)
157                 {
158                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
159                 }
160
161                 public override void RemoveAt (int index)
162                 {
163                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
164                 }
165
166                 public override void RemoveAt (string parameterName)
167                 {
168                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
169                 }
170
171                 public override void AddRange (Array values)
172                 {
173                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
174                 }
175
176                 public void AddRange (SqlParameter [] values)
177                 {
178                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
179                 }
180
181                 public void CopyTo (SqlParameter [] array, int index)
182                 {
183                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
184                 }
185
186                 public override int Count {
187                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
188                 }
189
190                 public override bool IsFixedSize {
191                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
192                 }
193
194                 public override bool IsReadOnly {
195                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
196                 }
197
198                 public override bool IsSynchronized {
199                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
200                 }
201
202                 public override object SyncRoot {
203                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
204                 }
205
206                 public SqlParameter this [int index] {
207                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
208                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
209                 }
210
211                 public SqlParameter this [string parameterName] {
212                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
213                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
214                 }
215         }
216 }