Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:05:07+00:00 2026-06-05T06:05:07+00:00

We set some quality contraint on our code, using NDEPEND CQL request: WARN IF

  • 0

We set some quality contraint on our code, using NDEPEND CQL request:

WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbParameters > 6

When defining a delegate with 5 arguments, for example:

delegate void MyDelegate(IArg arg1, IArg arg2, IArg arg3, IArg arg4, IArg arg5);

Then the quality constraint breaks on a function which is not present in source code (but probably in compiled code) and has 2 addtional arguments:

BeginInvoke(IArg, IArg, IArg, IArg, IArg, AsyncCallback,Object)

How to work around this impediment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:05:10+00:00Added an answer on June 5, 2026 at 6:05 am

    CQL cannot easily solve this issue, but Code Rule over LINQ (CQLinq) released since NDepend v4 can.

    CQLinq comes with facilities to define what is JustMyCode, hence eliminate generated methods like BeginInvoke(IArg, IArg, IArg, IArg, IArg, AsyncCallback,Object). This is explained in: Defining the code base view JustMyCode with notmycode prefix

    Basically the default and customizable code rule Discard generated Types from JustMyCode discard delegate types, and their methods, because they are always generated.

    // <Name>Discard generated Types from JustMyCode</Name>
    // --- Make sure to make this query richer to discard generated types from NDepend rules results ---
    notmycode
    from t in Application.Types where
    
      // Resources, Settings, or typed DataSet generated types for example, are tagged with this attribute
      t.HasAttribute ("System.CodeDom.Compiler.GeneratedCodeAttribute".AllowNoMatch()) ||
    
      // Delegate types are always generated
      t.IsDelegate ||
    
      // Discard ASP.NET page types generated by aspnet_compiler.exe
      // See: http://www.ndepend.com/FAQ.aspx#ASPNET
      t.ParentNamespace.Name.EqualsAny("ASP", "__ASP") ||
    
      // Discard generated type ContractException
      t.Name == "__ContractsRuntime+ContractException" ||
      t.FullName == "System.Diagnostics.Contracts.RuntimeContractsAttribute" ||
      t.FullName == "System.Diagnostics.Contracts.__ContractsRuntime" ||
    
      // Discard all types declared in a folder path containing the word "generated"
      (t.SourceFileDeclAvailable &&
       t.SourceDecls.All(s => s.SourceFile.FilePath.ParentDirectoryPath.ToString().ToLower().Contains("generated")))
    
    select new { t, t.NbILInstructions }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to set some default values for an object using after_initialize .
I would like to set some products to non-saleable, removing the Add to cart
I'm trying to set some values to my NSMutableDictionary inside a loop and assigning
I am trying to set some Http parameters in the HttpPost object. HttpPost post=new
I'm attempting to set some security and mailing settings on my SSRS server, however
How do I set some group policy rule or mechanism to make sure that
I would like to set some limits/boundaries on the amount of pixels we can
I'm trying to set some javascript data (json) in my markup by calling a
I need to set some server specific variables in a rails application that will
I have to set some routing rules in my php application, and they should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.