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