Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Dec 1, 2024
1 parent 21444f0 commit 01ef226
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Neo/SmartContract/Native/NativeContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ protected NativeContract()
// Reflection to get the methods

List<ContractMethodMetadata> listMethods = [];
foreach (MemberInfo member in GetType().GetMembers(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public))
foreach (var member in GetType().GetMembers(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public))
{
ContractMethodAttribute attribute = member.GetCustomAttribute<ContractMethodAttribute>();
if (attribute is null) continue;
listMethods.Add(new ContractMethodMetadata(member, attribute));
foreach (var attribute in member.GetCustomAttributes<ContractMethodAttribute>())
{
listMethods.Add(new ContractMethodMetadata(member, attribute));
}
}
_methodDescriptors = listMethods.OrderBy(p => p.Name, StringComparer.Ordinal).ThenBy(p => p.Parameters.Length).ToList().AsReadOnly();

Expand Down

0 comments on commit 01ef226

Please sign in to comment.