File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <configuration >
3
+ <system .diagnostics>
4
+ <trace >
5
+ <listeners >
6
+ <remove name =" Default" />
7
+ <add name =" ThrowingTraceListener" type =" NetMQ.Tests.ThrowingTraceListener, NetMQ.Tests" />
8
+ </listeners >
9
+ </trace >
10
+ </system .diagnostics>
11
+ </configuration >
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Diagnostics ;
3
+ using System . Runtime . Serialization ;
4
+
5
+ namespace NetMQ . Tests
6
+ {
7
+ public sealed class ThrowingTraceListener : TraceListener
8
+ {
9
+ public override void Fail ( string message , string detailMessage )
10
+ {
11
+ throw new DebugAssertFailureException ( ( message + Environment . NewLine + detailMessage ) . Trim ( ) ) ;
12
+ }
13
+
14
+ public override void Write ( string message )
15
+ {
16
+ }
17
+
18
+ public override void WriteLine ( string message )
19
+ {
20
+ }
21
+
22
+ [ Serializable ]
23
+ public class DebugAssertFailureException : Exception
24
+ {
25
+ public DebugAssertFailureException ( )
26
+ {
27
+ }
28
+
29
+ public DebugAssertFailureException ( string message ) : base ( message )
30
+ {
31
+ }
32
+
33
+ public DebugAssertFailureException ( string message , Exception inner ) : base ( message , inner )
34
+ {
35
+ }
36
+
37
+ protected DebugAssertFailureException ( SerializationInfo info , StreamingContext context ) : base ( info , context )
38
+ {
39
+ }
40
+ }
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments