benaadams / Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)
Apache License 2.0
2.76k stars 118 forks source link

Removed code that was heuristically unreachable. #93

Closed samtrion closed 4 years ago

samtrion commented 4 years ago

Both type.GetMethods(...) and methodInfo.GetCustomAttributes<>() return an empty array if nothing was found.

benaadams commented 4 years ago

return an empty array if nothing was found.

Should it check .Length == 0 rather than == null then?

samtrion commented 4 years ago

Why an additional check, when foreach is handling this?

benaadams commented 4 years ago

Ah was thinking of List<T> which creates an enumerator. Should be fine for array.

Thank you! 😄

benaadams commented 4 years ago

Package 0.1.6 has been released on NuGet