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