SqlTransaction.platformnotsupported.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.Data.Common;
  5. using System.Diagnostics;
  6. namespace System.Data.SqlClient
  7. {
  8. public sealed class SqlTransaction : DbTransaction
  9. {
  10. const string EXCEPTION_MESSAGE = "System.Data.SqlClient.SqlTransaction is not supported on the current platform.";
  11. internal readonly IsolationLevel _isolationLevel = IsolationLevel.ReadCommitted;
  12. internal SqlTransaction(SqlInternalConnection internalConnection, SqlConnection con,
  13. IsolationLevel iso, SqlInternalTransaction internalTransaction)
  14. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  15. new public SqlConnection Connection
  16. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  17. override protected DbConnection DbConnection
  18. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  19. internal SqlInternalTransaction InternalTransaction
  20. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  21. override public IsolationLevel IsolationLevel
  22. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  23. internal bool IsZombied
  24. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  25. internal SqlStatistics Statistics
  26. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  27. override public void Commit()
  28. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  29. protected override void Dispose(bool disposing)
  30. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  31. override public void Rollback()
  32. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  33. public void Rollback(string transactionName)
  34. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  35. public void Save(string savePointName)
  36. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  37. internal void Zombie()
  38. => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
  39. }
  40. }