File tree 1 file changed +4
-16
lines changed
src/StructureMap.DynamicInterception
1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -17,27 +17,15 @@ public MethodInvocationResult(Exception exception)
17
17
_exceptionDispatchInfo = ExceptionDispatchInfo . Capture ( exception ) ;
18
18
}
19
19
20
- public bool Successful
21
- {
22
- get { return _exceptionDispatchInfo != null ; }
23
- }
20
+ public bool Successful => _exceptionDispatchInfo == null ;
24
21
25
- public object ReturnValue { get ; private set ; }
22
+ public object ReturnValue { get ; }
26
23
27
- public Exception Exception
28
- {
29
- get
30
- {
31
- return _exceptionDispatchInfo != null ? _exceptionDispatchInfo . SourceException : null ;
32
- }
33
- }
24
+ public Exception Exception => _exceptionDispatchInfo ? . SourceException ;
34
25
35
26
public object GetReturnValueOrThrow ( )
36
27
{
37
- if ( _exceptionDispatchInfo != null )
38
- {
39
- _exceptionDispatchInfo . Throw ( ) ;
40
- }
28
+ _exceptionDispatchInfo ? . Throw ( ) ;
41
29
42
30
return ReturnValue ;
43
31
}
You can’t perform that action at this time.
0 commit comments