Removed code that was heuristically unreachable. (#93)

Both `type.GetMethods(...)` and `methodInfo.GetCustomAttributes<>()` return an empty array if nothing was found.
This commit is contained in:
Martin Stühmer 2019-11-30 06:34:02 +01:00 committed by Ben Adams
parent eaf0393860
commit 70b61a7a90

View File

@ -759,18 +759,10 @@ namespace System.Diagnostics
}
var methods = parentType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);
if (methods == null)
{
return false;
}
foreach (var candidateMethod in methods)
{
var attributes = candidateMethod.GetCustomAttributes<StateMachineAttribute>();
if (attributes == null)
{
continue;
}
foreach (var asma in attributes)
{