SixPairs

October 27, 2010

DGQL Tutorial

Filed under: DGML, DGQL — Tags: , — Ceyhun Ciper @ 17:24

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”:

image

Get the solution view:

+”Solution View”

Get all the elements of a solution (essentially, projects & solution folders):

+”Solution View”//

image

Get the class view:

+”Class View”

Get all the namespaces:

+”Class View”//

image

Select only “projects” in the solution:

+”Solution View”//
+Category.Is(“CodeSchema_Project”)image

Select only “solution folders” in the solution:

+”Solution View”//
+Category.Is(“SolutionFolder”)
image

Get all “project folders” in “all projects” in the solution:

+”Solution View”//
+Category.Is(“CodeSchema_Project”)/”Node:Both:ProjectFolder”

image

Blog at WordPress.com.