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:
parent
eaf0393860
commit
70b61a7a90
@ -759,18 +759,10 @@ namespace System.Diagnostics
|
|||||||
}
|
}
|
||||||
|
|
||||||
var methods = parentType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);
|
var methods = parentType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);
|
||||||
if (methods == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var candidateMethod in methods)
|
foreach (var candidateMethod in methods)
|
||||||
{
|
{
|
||||||
var attributes = candidateMethod.GetCustomAttributes<StateMachineAttribute>();
|
var attributes = candidateMethod.GetCustomAttributes<StateMachineAttribute>();
|
||||||
if (attributes == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var asma in attributes)
|
foreach (var asma in attributes)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user