Types(Func<INamedType, bool>)
Selects the types that declare the intercepted methods with a predicate over type definitions.
Declaration
ITypeFilterSelection Types(Func<INamedType, bool> predicate)Parameters
| Type | Name | Description |
|---|---|---|
| Func<INamedType, bool> | predicate | The predicate. It is stored with the registration, so it must not capture a declaration or a compilation. It is invoked once for each type definition that declares a method of a selected name. |
Returns
| Type | Description |
|---|---|
| ITypeFilterSelection |
Remarks
The methods must then be given by name with Methods(params string[]), because the engine finds the call sites by the name of the called method.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|