findAttribute method
Finds the first CustomAttribute with the specified name
.
Throws a WinmdException if no matching attribute is found.
Implementation
CustomAttribute findAttribute(String name) =>
attributes.where((attr) => attr.name == name).firstOrNull ??
(throw WinmdException('Attribute not found: $name'));