Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Expression Functions

yck1509 edited this page Dec 9, 2014 · 2 revisions

Rule patterns in ConfuserEx project are consists of different expression functions.

There are 2 kinds of literal expressions in the rule patterns :

  • Boolean literals : true and false
  • String literals, the literals are enclosed with quotes (' and "). Characters can be escaped with blackslashes(\). For example, 'NS1.MyClass'.

There are 3 operators in the rule patterns :

  • and
  • or
  • not

Each rule patterns should evaluate to a boolean value. True indicates the rule would applies to the item being evaluated.

ConfuserEx supports the following functions:

decl-type(string)

This function returns true if the type being evaluated (or declaring type for type members) has specified signature.

full-name(string)

This function returns true if the item being evaluated has specified signature.

is-public()

This function returns true if the item being evaluated is visible outside the assembly.

match(string)

This function returns true if the signature of the item being evaluated matches with the specified RegEx.

match-name(string)

This function returns true if the name of the item being evaluated matches with the specified RegEx.

match-type-name(string)

This function returns true if the name of the type being evaluated (or declaring type for type members) matches with the specified RegEx.

member-type(string)

This function returns true if the item being evaluated has the specified type. The supported types are type, method, field, property, event and module.

module(string)

This function returns true if the module of the item being evaluated has the specified name.

name(string)

This function returns true if the name of the item being evaluated has the specified name.

namespace(string)

This function returns true if the type being evaluated (or declaring type for type members) has specified namespace.

inherits(string)

This function returns true if the type being evaluated inherits from the specified type.

is-type(string)

This function returns true if the type being evaluated is of the specified special types.