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 ;
23using System . Linq ;
34using System . Reflection ;
45
@@ -15,9 +16,16 @@ internal static class AssemblyExtensions
1516 internal static bool IsTrue ( this bool ? valueOrNothing ) => valueOrNothing . HasValue && valueOrNothing . Value ;
1617
1718 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+ }
2129
2230 private static bool ? IsJitOptimizerDisabled ( this DebuggableAttribute ? attribute ) => attribute ? . IsJITOptimizerDisabled ;
2331
You can’t perform that action at this time.
0 commit comments