[System*] Throw a PlatformNotSupported exception when using the managed networking...
[mono.git] / mcs / class / System.Data / System.Data.SqlClient / SqlCommandBuilder.platformnotsupported.cs
1 //
2 // SqlCommandBuilder.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.Data;
29 using System.Data.Common;
30 using System.Data.SqlClient;
31
32 namespace System.Data.SqlClient
33 {
34         public class SqlCommandBuilder : DbCommandBuilder 
35         {
36                 const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlCommandBuilder is not supported on the current platform.";
37
38                 public SqlCommandBuilder ()
39                 {
40                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
41                 }
42
43                 public SqlCommandBuilder (SqlDataAdapter adapter)
44                 {
45                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
46                 }
47
48                 public static void DeriveParameters (SqlCommand command)
49                 {
50                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
51                 }
52
53                 public SqlCommand GetDeleteCommand ()
54                 {
55                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
56                 }
57
58                 public SqlCommand GetInsertCommand ()
59                 {
60                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
61                 }
62
63                 public SqlCommand GetUpdateCommand ()
64                 {
65                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
66                 }
67
68                 public SqlCommand GetUpdateCommand (bool useColumnsForParameterNames)
69                 {
70                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
71                 }
72
73                 public SqlCommand GetDeleteCommand (bool useColumnsForParameterNames)
74                 {
75                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
76                 }
77
78                 public SqlCommand GetInsertCommand (bool useColumnsForParameterNames)
79                 {
80                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
81                 }
82
83                 public override string QuoteIdentifier (string unquotedIdentifier)
84                 {
85                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
86                 }
87
88                 public override string UnquoteIdentifier (string quotedIdentifier)
89                 {
90                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
91                 }
92
93                 protected override void ApplyParameterInfo (DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
94                 {
95                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
96                 }
97
98                 protected override string GetParameterName (int parameterOrdinal)
99                 {
100                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
101                 }
102
103                 protected override string GetParameterName (string parameterName)
104                 {
105                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
106                 }
107
108                 protected override string GetParameterPlaceholder (int parameterOrdinal)
109                 {
110                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
111                 }
112
113                 protected override void SetRowUpdatingHandler (DbDataAdapter adapter)
114                 {
115                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
116                 }
117
118                 protected override DataTable GetSchemaTable (DbCommand srcCommand)
119                 {
120                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
121                 }
122
123                 protected override DbCommand InitializeCommand (DbCommand command)
124                 {
125                         throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
126                 }
127
128                 public SqlDataAdapter DataAdapter {
129                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
130                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
131                 }
132
133                 public override string QuotePrefix {
134                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
135                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
136                 }
137
138                 public override string QuoteSuffix {
139                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
140                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
141                 }
142
143                 public override string CatalogSeparator {
144                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
145                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
146                 }
147
148                 public override string SchemaSeparator {
149                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
150                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
151                 }
152
153                 public override CatalogLocation CatalogLocation {
154                         get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
155                         set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
156                 }
157         }
158 }