Excludes

Excludes

How can I can exclude Properties(get/set) and Default Constructors(esp. when added by compiler)?


RE: Excludes

You can filter them out by excluding the get and set methods that are generated.

Here's a link to the syntax for the method exclude:

http://docs.ncover.com/ref/3-0/ncover-console/command-line/profiling-options#em

We've been successful here with the regex ..get_., just as an example.

Hope this helps!

NCover Support


RE: Excludes

Here is an example of what I am trying to exclude. I have many getter and setter like this. What regex can I use for these? Thanks!

    public  virtual string Action
    {
        get { return _action; }
        set {_action= value; }
    }


RE: Excludes

I actually got this to work:

.set.;.get.


RE: Excludes

just an FYI, the regex I posted contained asterisks but they didn't appear after posting so I guess your post had some issue

.asteriskset.asterisk;.asteriskget.asterisk


RE: Excludes

I think the regex posted above is too generic. I am only trying to exclude those with no logic like my example above. I am not referring to automatic properties since they are excluded by default.

I tried the following but did not work:

I substituted the actual word asterisk for the symbol.

get\s+{.ASTERISK?} get\s+{.ASTERISK\s+}

Update - Some symbols are being removed when I click submit, not sure how to post my regex - if you have one based on my get and set above, please let me know.