File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/BenchmarkDotNet/Extensions Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
- using System . Diagnostics ;
1
+ using System ;
2
+ using System . Diagnostics ;
2
3
using System . Linq ;
3
4
using System . Reflection ;
4
5
@@ -15,9 +16,16 @@ internal static class AssemblyExtensions
15
16
internal static bool IsTrue ( this bool ? valueOrNothing ) => valueOrNothing . HasValue && valueOrNothing . Value ;
16
17
17
18
private static DebuggableAttribute ? GetDebuggableAttribute ( Assembly ? assembly )
18
- => assembly ? . GetCustomAttributes ( )
19
- . OfType < DebuggableAttribute > ( )
20
- . SingleOrDefault ( ) ;
19
+ {
20
+ try
21
+ {
22
+ return assembly ? . GetCustomAttributes ( ) . OfType < DebuggableAttribute > ( ) . SingleOrDefault ( ) ;
23
+ }
24
+ catch ( Exception )
25
+ {
26
+ return null ;
27
+ }
28
+ }
21
29
22
30
private static bool ? IsJitOptimizerDisabled ( this DebuggableAttribute ? attribute ) => attribute ? . IsJITOptimizerDisabled ;
23
31
You can’t perform that action at this time.
0 commit comments