Share via


Excluding Methods

Methods may be excluded by first selecting the type using the <type> element, then providing a rule for selecting methods to exclude. Methods may be excluded by name and attribute specifier (as explained in the type section above), as well as by signature.

Allowed attribute specifiers are:

abstract
assembly
family
familyorassembly
final
private
public
static
virtual

If the attribute specifier is not set explicitly, then the "speclist" attribute will not be used at all as a matching criterion.

The following example selects all public instance methods beginning with “Set”:

<method regex="true" name="Set.*" speclist="+public,-static"/>

Method signatures are specified using the “signature” attribute. A signature is a (possibly empty) list of types that match the types in the method’s parameter list:

signature=””  <!-- empty parameter list -->

FakePre-40098d4af406437f8b546ab7587c2b86-0b91c7fd6f9b4bc3b5f915d534991b98

If the signature is not set explicitly, then the method signature will not be used at all as a matching criterion.

The following example selects a method by signature:

<method name="DoIt" signature="int, System.Console, System.Collection.ICollection, float[]"/>

Global methods may be specified by using a special type selector with the name “Module:mod_name” where mod_name is the name of the module containing the global method.

© 2002-2007 PreEmptive Solutions. All rights reserved.