Skip to content

Commit 54330a6

Browse files
committed
Make DebugAssertFailureException serializable in all available builds
1 parent 08fee02 commit 54330a6

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/Test/Utilities/Portable/ThrowingTraceListener.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
using System;
44
using System.Diagnostics;
55

6+
#if !NETSTANDARD1_3
7+
using System.Runtime.Serialization;
8+
#endif
9+
610
namespace Microsoft.CodeAnalysis
711
{
812
// To enable this for a process, add the following to the app.config for the project:
@@ -56,11 +60,17 @@ public override void WriteLine(string message, string category)
5660
{
5761
}
5862

63+
#if !NETSTANDARD1_3
64+
[Serializable]
65+
#endif
5966
public class DebugAssertFailureException : Exception
6067
{
6168
public DebugAssertFailureException() { }
6269
public DebugAssertFailureException(string message) : base(message) { }
63-
public DebugAssertFailureException(string message, Exception inner) : base(message, inner) { }
70+
public DebugAssertFailureException(string message, Exception innerException) : base(message, innerException) { }
71+
#if !NETSTANDARD1_3
72+
protected DebugAssertFailureException(SerializationInfo info, StreamingContext context) : base(info, context) { }
73+
#endif
6474
}
6575
}
6676
}

0 commit comments

Comments
 (0)