A provider for LINQ over code reflection
Instead of querying database, I would like to easily query "code" from a specific assembly.
For example, let's say I want to find public methods in class whose name ends with "Controller" that have no "Permission" attribute declaration, I would write:
from c in assembly.Classes
where c.Name.EndsWith("Controller")
from m in c.Methods
where m.Modifier == Modifier.Public
&& m.Attributes["Permission"] == null
select m
3
votes
bystander
shared this idea