This is a short tutorial on DGQL using Visual Studio 2010.
Pre-requisite: Understanding Directed Graph Query Language (DGQL)
Simplest query:
*
Create a ClassLibrary1 and add a text file (“Graph.dgql”) containing the above query to it; you will end-up with the following in “Architecture Explorer”:
Get the solution view:
+”Solution View”
Get all the elements of a solution (essentially, projects & solution folders):
+”Solution View”//
Get the class view:
+”Class View”
Get all the namespaces:
+”Class View”//
Select only “projects” in the solution:
+”Solution View”//
+Category.Is(“CodeSchema_Project”)
Select only “solution folders” in the solution:
+”Solution View”//
+Category.Is(“SolutionFolder”)
Get all “project folders” in “all projects” in the solution:
+”Solution View”//
+Category.Is(“CodeSchema_Project”)/”Node:Both:ProjectFolder”