diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-05-30 13:52:03 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-30 13:52:03 +0300 |
commit | e49886bd091487abfbf5de934a451c5a8fe7f4c5 (patch) | |
tree | 9be1edce4158baf348d542e25fb8418285b06346 /src/System.Transactions.Local | |
parent | a50d8c81151fb97996da2fcafd2a97c7f3c8938c (diff) |
Revert "Scale back [Serializable] CoreFX types (#19742)"
This reverts commit 6dd451f51451a7d0ceea6104b51bd17005e9a0e6.
Diffstat (limited to 'src/System.Transactions.Local')
6 files changed, 13 insertions, 0 deletions
diff --git a/src/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs b/src/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs index 160228dc50..4aa0751c6b 100644 --- a/src/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs @@ -7,6 +7,7 @@ using System.Threading; namespace System.Transactions { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification="Serialization not yet supported and will be done using DistributedTransaction")] + [Serializable] public sealed class CommittableTransaction : Transaction, IAsyncResult { internal bool _completedSynchronously = false; diff --git a/src/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs b/src/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs index 4b7333bac0..49d86ba89f 100644 --- a/src/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs @@ -6,6 +6,7 @@ namespace System.Transactions { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] + [Serializable] public sealed class DependentTransaction : Transaction { private bool _blocking; diff --git a/src/System.Transactions.Local/src/System/Transactions/DistributedTransaction.cs b/src/System.Transactions.Local/src/System/Transactions/DistributedTransaction.cs index fe853f8732..aea39d1c77 100644 --- a/src/System.Transactions.Local/src/System/Transactions/DistributedTransaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/DistributedTransaction.cs @@ -57,6 +57,7 @@ namespace System.Transactions.Distributed /// clones have the same capabilities as the original transaction, except for the ability to commit /// the transaction. /// </summary> + [Serializable] internal class DistributedTransaction : ISerializable, IObjectReference { internal DistributedTransaction() @@ -147,12 +148,14 @@ namespace System.Transactions.Distributed return new PlatformNotSupportedException(SR.DistributedNotSupported); } + [Serializable] internal class RealDistributedTransaction { internal InternalTransaction InternalTransaction { get; set; } } } + [Serializable] internal class DistributedDependentTransaction : DistributedTransaction { internal void Complete() @@ -161,6 +164,7 @@ namespace System.Transactions.Distributed } } + [Serializable] internal class DistributedCommittableTransaction : DistributedTransaction { internal void BeginCommit(InternalTransaction tx) diff --git a/src/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs b/src/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs index 5fed0b7093..ad16d62e80 100644 --- a/src/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs @@ -5,6 +5,7 @@ namespace System.Transactions { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] + [Serializable] public sealed class SubordinateTransaction : Transaction { // Create a transaction with the given settings diff --git a/src/System.Transactions.Local/src/System/Transactions/Transaction.cs b/src/System.Transactions.Local/src/System/Transactions/Transaction.cs index 32b02522f4..170960f1ad 100644 --- a/src/System.Transactions.Local/src/System/Transactions/Transaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/Transaction.cs @@ -53,6 +53,7 @@ namespace System.Transactions // When we serialize a Transaction, we specify the type DistributedTransaction, so a Transaction never // actually gets deserialized. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] + [Serializable] public class Transaction : IDisposable, ISerializable { // UseServiceDomain diff --git a/src/System.Transactions.Local/src/System/Transactions/TransactionException.cs b/src/System.Transactions.Local/src/System/Transactions/TransactionException.cs index aade4ab5f4..7cd2795043 100644 --- a/src/System.Transactions.Local/src/System/Transactions/TransactionException.cs +++ b/src/System.Transactions.Local/src/System/Transactions/TransactionException.cs @@ -10,6 +10,7 @@ namespace System.Transactions /// <summary> /// Summary description for TransactionException. /// </summary> + [Serializable] public class TransactionException : SystemException { internal static bool IncludeDistributedTxId(Guid distributedTxId) @@ -172,6 +173,7 @@ namespace System.Transactions /// <summary> /// Summary description for TransactionAbortedException. /// </summary> + [Serializable] public class TransactionAbortedException : TransactionException { internal static new TransactionAbortedException Create(string message, Exception innerException, Guid distributedTxId) @@ -247,6 +249,7 @@ namespace System.Transactions /// <summary> /// Summary description for TransactionInDoubtException. /// </summary> + [Serializable] public class TransactionInDoubtException : TransactionException { internal static new TransactionInDoubtException Create(TraceSourceType traceSource, string message, Exception innerException, Guid distributedTxId) @@ -307,6 +310,7 @@ namespace System.Transactions /// <summary> /// Summary description for TransactionManagerCommunicationException. /// </summary> + [Serializable] public class TransactionManagerCommunicationException : TransactionException { internal static new TransactionManagerCommunicationException Create(string message, Exception innerException) @@ -364,6 +368,7 @@ namespace System.Transactions } + [Serializable] public class TransactionPromotionException : TransactionException { /// <summary> |