Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The tool <a href="http://www.NDepend.com" rel="nofollow noreferrer">NDepend</a> can be used for that (<em>Disclaimer: I am one of the developers of the tool</em>). </p> <p>You can write some <a href="http://www.ndepend.com/Features.aspx#CQL" rel="nofollow noreferrer">Code Rules over LINQ Queries (CQLinq)</a> to check any kind of dependency, like a method call for example. Code rules can be <a href="http://www.ndepend.com/Doc_VS_CQL.aspx" rel="nofollow noreferrer">checked in Visual Studio</a> after each successful compilation, or <a href="http://www.ndepend.com/Doc_CI_Report.aspx#CQLRule" rel="nofollow noreferrer">rules can be checked at build process time</a> as well.</p> <p>Such a CQLinq code rule can look like:</p> <pre><code>warnif count &gt; 0 from m in Application.Methods where m.IsUsing("System.Configuration.ConfigurationManager.get_AppSettings()") select m </code></pre> <p>The rule can be specialized at whim, to forbid for example namespaces that match a regex, to contain methods that call the <code>get_AppSettings()</code> getter method:</p> <pre><code>warnif count &gt; 0 from m in Application.Namespaces.WithNameLike("regex").ChildMethods() where m.IsUsing("System.Configuration.ConfigurationManager.get_AppSettings()") select m </code></pre> <p>From the NDepend <a href="http://www.ndepend.com/Doc_Matrix.aspx" rel="nofollow noreferrer">dependency matrix</a> or <a href="http://www.ndepend.com/Doc_VS_Arch.aspx" rel="nofollow noreferrer">dependency graph</a>, you can also right click a dependency (matrix cell or graph arrow) and generate a code rule that warns if the dependency exist (and then specialize the rule generated if you need):</p> <p><img src="https://i.stack.imgur.com/2caWE.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload