File: SqlParameter.platformnotsupported.cs

package info (click to toggle)
mono 6.8.0.105%2Bdfsg-3.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,284,512 kB
  • sloc: cs: 11,172,132; xml: 2,850,069; ansic: 671,653; cpp: 122,091; perl: 59,366; javascript: 30,841; asm: 22,168; makefile: 20,093; sh: 15,020; python: 4,827; pascal: 925; sql: 859; sed: 16; php: 1
file content (328 lines) | stat: -rw-r--r-- 10,630 bytes parent folder | download | duplicates (6)
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
// 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.ComponentModel;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.IO;
using System.Globalization;
using System.Reflection;
using System.Xml;
using MSS = Microsoft.SqlServer.Server;
using Microsoft.SqlServer.Server;
using System.ComponentModel.Design.Serialization;

namespace System.Data.SqlClient
{
	public sealed partial class SqlParameter : DbParameter, IDbDataParameter, ICloneable
	{
		const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameter is not supported on the current platform.";

		public SqlParameter() : base() {}
		public SqlParameter(string parameterName, SqlDbType dbType) : this() {}
		public SqlParameter(string parameterName, object value) : this() {}
		public SqlParameter(string parameterName, SqlDbType dbType, int size) : this() {}
		public SqlParameter(string parameterName, SqlDbType dbType, int size, string sourceColumn) : this() {}

		public SqlParameter(
			string parameterName,
			SqlDbType dbType,
			int size,
			ParameterDirection direction,
			bool isNullable,
			byte precision,
			byte scale,
			string sourceColumn,
			DataRowVersion sourceVersion,
			object value
		) : this(parameterName, dbType, size, sourceColumn)
		{
		}

		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
		) : this()
		{
		}

		internal SqlCollation Collation
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public string XmlSchemaCollectionDatabase
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public string XmlSchemaCollectionOwningSchema
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public string XmlSchemaCollectionName
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override DbType DbType
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override void ResetDbType()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal MetaType InternalMetaType
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public int LocaleId
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal MSS.SmiParameterMetaData MetaDataForSmi(out ParameterPeekAheadValue peekAhead)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal bool ParameterIsSqlType
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override string ParameterName
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal string ParameterNameFixed
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		public new byte Precision
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal byte PrecisionInternal
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public new byte Scale
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal byte ScaleInternal
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public SqlDbType SqlDbType
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public void ResetSqlDbType()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		public object SqlValue
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public string UdtTypeName
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public String TypeName
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override object Value
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal INullable ValueAsINullable
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal bool IsNull
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal int GetActualSize()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		object ICloneable.Clone()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal static object CoerceValue(object value, MetaType destinationType, out bool coercedToDataFeed, out bool typeChanged, bool allowStreaming = true)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal void FixStreamDataForNonPLP()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		public override DataRowVersion SourceVersion
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal byte GetActualPrecision()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal byte GetActualScale()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal int GetParameterSize()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal object GetCoercedValue()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal bool CoercedValueIsSqlType
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal bool CoercedValueIsDataFeed
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		[Conditional("DEBUG")]
		internal void AssertCachedPropertiesAreValid()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		[Conditional("DEBUG")]
		internal void AssertPropertiesAreValid(object value, bool? isSqlType = null, bool? isDataFeed = null, bool? isNull = null)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal void Prepare(SqlCommand cmd)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal void SetSqlBuffer(SqlBuffer buff)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal void SetUdtLoadError(Exception e)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal void Validate(int index, bool isCommandProc)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal MetaType ValidateTypeLengths()
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal static string[] ParseTypeName(string typeName, bool isUdtTypeName)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		internal sealed class SqlParameterConverter : ExpandableObjectConverter
		{
			public SqlParameterConverter()
				=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

			public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
				=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

			public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
				=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override ParameterDirection Direction
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override bool IsNullable
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public int Offset
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override int Size
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override string SourceColumn
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		public override bool SourceColumnNullMapping
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}

		internal void CopyTo(SqlParameter destination)
			=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

		public SqlCompareOptions CompareInfo
		{
			get	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
			set	=> throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
		}
	}

	internal abstract class DataFeed {}

	internal class StreamDataFeed : DataFeed
	{
		internal Stream _source;
		internal StreamDataFeed(Stream source) {}
	}

	internal class TextDataFeed : DataFeed
	{
		internal TextReader _source;
		internal TextDataFeed(TextReader source) {}
	}

	internal class XmlDataFeed : DataFeed
	{
		internal XmlReader _source;
		internal XmlDataFeed(XmlReader source) {}
	}
}