To complete the stusmith's answer, NDepend seems to be what you are looking for. NDepend lets write Code Queries and Rules over LINQ Queries, (what we call CQLinq). Disclaimer: I am one of the developers of the tool
For example here are some CQLinq queries:
-> list classes whose name begin by x
from t in Application.Types.WithNameLike("^x")
where t.IsClass select t
-> list all the subclasses of x
from t in Application.Types
where t.DeriveFrom("MyNamespace.MyTypeX")
select t
-> list methods which instanciate an object of class x
from m in Application.Methods
where m.CreateA("MyNamespace.MyTypeX")
select m
-> list methods calling the method y - ...
from m in Application.Methods
where m.IsUsing("MyNamespace.MyType.MyMethodY()")
select m
More than 200 code rules are proposed by default. Customizing existing rules or creating your own rules is straightforward thanks to the well-known C# LINQ syntax.
CQLinq queries can be edited live in VisualStudio, and offer instant result, with browsing facilities:

Actually, CQLinq is based on NDepend.API, and more specifically on types in the namespace NDepend.CodeModel. With NDepend.API you can write programs to do things more tricky tghan just CQLinq queries, for example we wrote a Code Duplicate Finder tool with NDepend.API.
Rules can be verified live in Visual Studio and at Build Process time, in a generated HTML+javascript report.