SqlParameterCollection.platformnotsupported.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.
  4. using System;
  5. using System.Collections;
  6. using System.Data;
  7. using System.Data.Common;
  8. using System.Data.SqlClient;
  9. namespace System.Data.SqlClient
  10. {
  11. public partial class SqlParameterCollection : DbParameterCollection , IDataParameterCollection, IList, ICollection, IEnumerable
  12. {
  13. const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlParameterCollection is not supported on the current platform.";
  14. internal SqlParameterCollection () {}
  15. protected override DbParameter GetParameter (int index)
  16. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  17. protected override DbParameter GetParameter (string parameterName)
  18. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  19. protected override void SetParameter (int index, DbParameter value)
  20. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  21. protected override void SetParameter (string parameterName, DbParameter value)
  22. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  23. public override int Add (object value)
  24. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  25. public SqlParameter Add (SqlParameter value)
  26. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  27. public SqlParameter AddWithValue (string parameterName, object value)
  28. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  29. public SqlParameter Add (string parameterName, SqlDbType sqlDbType)
  30. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  31. public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size)
  32. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  33. public SqlParameter Add (string parameterName, SqlDbType sqlDbType, int size, string sourceColumn)
  34. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  35. public override void Clear ()
  36. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  37. public override bool Contains (object value)
  38. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  39. public override bool Contains (string value)
  40. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  41. public bool Contains (SqlParameter value)
  42. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  43. public override void CopyTo (Array array, int index)
  44. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  45. public override IEnumerator GetEnumerator ()
  46. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  47. public override int IndexOf (object value)
  48. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  49. public override int IndexOf (string parameterName)
  50. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  51. public int IndexOf (SqlParameter value)
  52. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  53. public override void Insert (int index, object value)
  54. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  55. public void Insert (int index, SqlParameter value)
  56. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  57. public override void Remove (object value)
  58. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  59. public void Remove (SqlParameter value)
  60. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  61. public override void RemoveAt (int index)
  62. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  63. public override void RemoveAt (string parameterName)
  64. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  65. public override void AddRange (Array values)
  66. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  67. public void AddRange (SqlParameter [] values)
  68. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  69. public void CopyTo (SqlParameter [] array, int index)
  70. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  71. public override int Count
  72. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  73. public override bool IsFixedSize
  74. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  75. public override bool IsReadOnly
  76. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  77. public override bool IsSynchronized
  78. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  79. public override object SyncRoot
  80. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  81. public SqlParameter this [int index] {
  82. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  83. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  84. }
  85. public SqlParameter this [string parameterName] {
  86. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  87. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  88. }
  89. internal bool IsDirty {
  90. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  91. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  92. }
  93. }
  94. }