SqlCommandBuilder.platformnotsupported.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.Data;
  6. using System.Data.Common;
  7. using System.Data.SqlClient;
  8. namespace System.Data.SqlClient
  9. {
  10. public class SqlCommandBuilder : DbCommandBuilder
  11. {
  12. const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlCommandBuilder is not supported on the current platform.";
  13. public SqlCommandBuilder ()
  14. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  15. public SqlCommandBuilder (SqlDataAdapter adapter)
  16. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  17. public static void DeriveParameters (SqlCommand command)
  18. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  19. public SqlCommand GetDeleteCommand ()
  20. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  21. public SqlCommand GetInsertCommand ()
  22. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  23. public SqlCommand GetUpdateCommand ()
  24. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  25. public SqlCommand GetUpdateCommand (bool useColumnsForParameterNames)
  26. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  27. public SqlCommand GetDeleteCommand (bool useColumnsForParameterNames)
  28. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  29. public SqlCommand GetInsertCommand (bool useColumnsForParameterNames)
  30. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  31. public override string QuoteIdentifier (string unquotedIdentifier)
  32. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  33. public override string UnquoteIdentifier (string quotedIdentifier)
  34. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  35. protected override void ApplyParameterInfo (DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
  36. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  37. protected override string GetParameterName (int parameterOrdinal)
  38. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  39. protected override string GetParameterName (string parameterName)
  40. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  41. protected override string GetParameterPlaceholder (int parameterOrdinal)
  42. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  43. protected override void SetRowUpdatingHandler (DbDataAdapter adapter)
  44. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  45. protected override DataTable GetSchemaTable (DbCommand srcCommand)
  46. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  47. protected override DbCommand InitializeCommand (DbCommand command)
  48. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  49. public SqlDataAdapter DataAdapter {
  50. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  51. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  52. }
  53. public override string QuotePrefix {
  54. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  55. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  56. }
  57. public override string QuoteSuffix {
  58. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  59. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  60. }
  61. public override string CatalogSeparator {
  62. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  63. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  64. }
  65. public override string SchemaSeparator {
  66. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  67. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  68. }
  69. public override CatalogLocation CatalogLocation {
  70. get => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  71. set => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  72. }
  73. }
  74. }