title: NDepend query methods/types in framework assembly being used by other assemblies/types
body: <p>I am trying to determine which types or methods in a base framework assembly are being used by other assemblies in the application system. I cannot seem to find a straight-cut query to do that.</p>
  
  <p>What i have to do is first determine which assemblies are directly using the framework assembly, then manually list them in a second query</p>
  
  <pre><code>SELECT TYPES FROM ASSEMBLIES "IBM.Data.DB2"
  WHERE IsDirectlyUsedBy "ASSEMBLY:FirstDirectUsedByAssebmly"
  OR IsDirectlyUsedBy "ASSEMBLY:SecondDirectUsedByAssebmly"
  OR IsDirectlyUsedBy "ASSEMBLY:ThirdDirectUsedByAssebmly"
  OR IsDirectlyUsedBy "ASSEMBLY:FourthDirectUsedByAssebmly"
  </code></pre>
  
  <p>Is there a better/faster way to query for this?</p>
  
  <p>Additionally, the query results are focused on the matched types only. The Dependency graph or matrix exported only shows details of those. I do not know how to render a graph that shows those types or methods <em>plus</em> show the dependent types/methods from other assemblies that are consuming them?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I cannot use a query like</p>
  
  <pre><code>SELECT METHODS/TYPES WHERE IsPublic AND !CouldBeInternal
  </code></pre>
  
  <p>because the results return very queer results of using obfuscated types within the IBM.Data.DB2 assembly.</p>
  
  <pre><code>SELECT TYPES
  FROM ASSEMBLIES "IBM.Data.DB2"
  WHERE IsPublic AND !CouldBeInternal
  
  
  48 items 
  
  --------------------------------------------------+--------------+
  types                                             |# IL instructi|
                                                    |ons           |
  --------------------------------------------------+--------------+
  IBM.Data.DB2.ae+m                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+x                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+f                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+ac                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+aa                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+u                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+z                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+e                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+b                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+g                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+ab                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+h                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+r                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+p                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+ad                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+i                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+j                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+t                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+af                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+k                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+l                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+y                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+a                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+q                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+n                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+d                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+c                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+ae                                |0             |
                                                    |              |
  IBM.Data.DB2.ae+o                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+w                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+s                                 |0             |
                                                    |              |
  IBM.Data.DB2.ae+v                                 |0             |
                                                    |              |
  IBM.Data.DB2.DB2Command                           |2 527         |
                                                    |              |
  IBM.Data.DB2.DB2Connection                        |3 246         |
                                                    |              |
  IBM.Data.DB2.DB2DataAdapter                       |520           |
                                                    |              |
  IBM.Data.DB2.DB2DataReader                        |4 220         |
                                                    |              |
  IBM.Data.DB2.DB2_UDF_PLATFORM                     |0             |
                                                    |              |
  IBM.Data.DB2.DB2Enumerator+DB2EnumInstance        |19            |
                                                    |              |
  IBM.Data.DB2.DB2Enumerator+DB2EnumDatabase        |15            |
                                                    |              |
  IBM.Data.DB2.DB2Error                             |98            |
                                                    |              |
  IBM.Data.DB2.DB2ErrorCollection                   |55            |
                                                    |              |
  IBM.Data.DB2.DB2Exception                         |185           |
                                                    |              |
  IBM.Data.DB2.DB2Parameter                         |1 853         |
                                                    |              |
  IBM.Data.DB2.DB2ParameterCollection               |1 383         |
                                                    |              |
  IBM.Data.DB2.DB2RowUpdatedEventHandler            |0             |
                                                    |              |
  IBM.Data.DB2.DB2RowUpdatedEventArgs               |14            |
                                                    |              |
  IBM.Data.DB2.DB2Type                              |0             |
                                                    |              |
  IBM.Data.DB2.DB2XmlReader                         |500           |
                                                    |              |
  --------------------------------------------------+--------------+
  Sum:                                              |14 635        |
                                                    |              |
  Average:                                          |304.9         |
                                                    |              |
  Minimum:                                          |0             |
                                                    |              |
  Maximum:                                          |4 220         |
                                                    |              |
  Standard deviation:                               |868.22        |
                                                    |              |
  Variance:                                         |753 808       |
                                                    |              |
  --------------------------------------------------+--------------+
  </code></pre>
  
  <p>Our code does not use those types and enums directly.</p>