1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
6 using System
.Collections
;
8 using System
.Data
.Common
;
9 using System
.Data
.SqlClient
;
11 namespace System
.Data
.SqlClient
13 public partial class SqlParameterCollection
: DbParameterCollection
, IDataParameterCollection
, IList
, ICollection
, IEnumerable
15 const string EXCEPTION_MESSAGE
= "System.Data.SqlClient.SqlParameterCollection is not supported on the current platform.";
17 internal SqlParameterCollection () {}
19 protected override DbParameter
GetParameter (int index
)
20 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
22 protected override DbParameter
GetParameter (string parameterName
)
23 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
25 protected override void SetParameter (int index
, DbParameter
value)
26 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
28 protected override void SetParameter (string parameterName
, DbParameter
value)
29 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
31 public override int Add (object value)
32 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
34 public SqlParameter
Add (SqlParameter
value)
35 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
37 public SqlParameter
AddWithValue (string parameterName
, object value)
38 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
40 public SqlParameter
Add (string parameterName
, SqlDbType sqlDbType
)
41 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
43 public SqlParameter
Add (string parameterName
, SqlDbType sqlDbType
, int size
)
44 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
46 public SqlParameter
Add (string parameterName
, SqlDbType sqlDbType
, int size
, string sourceColumn
)
47 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
49 public override void Clear ()
50 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
52 public override bool Contains (object value)
53 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
55 public override bool Contains (string value)
56 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
58 public bool Contains (SqlParameter
value)
59 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
61 public override void CopyTo (Array array
, int index
)
62 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
64 public override IEnumerator
GetEnumerator ()
65 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
67 public override int IndexOf (object value)
68 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
70 public override int IndexOf (string parameterName
)
71 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
73 public int IndexOf (SqlParameter
value)
74 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
76 public override void Insert (int index
, object value)
77 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
79 public void Insert (int index
, SqlParameter
value)
80 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
82 public override void Remove (object value)
83 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
85 public void Remove (SqlParameter
value)
86 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
88 public override void RemoveAt (int index
)
89 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
91 public override void RemoveAt (string parameterName
)
92 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
94 public override void AddRange (Array values
)
95 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
97 public void AddRange (SqlParameter
[] values
)
98 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
100 public void CopyTo (SqlParameter
[] array
, int index
)
101 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
103 public override int Count
104 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
106 public override bool IsFixedSize
107 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
109 public override bool IsReadOnly
110 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
112 public override bool IsSynchronized
113 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
115 public override object SyncRoot
116 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
118 public SqlParameter
this [int index
] {
119 get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
120 set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
123 public SqlParameter
this [string parameterName
] {
124 get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
125 set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
128 internal bool IsDirty
{
129 get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
130 set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);