Click or drag to resize

AssignMethodAttribute Constructor

Initializes a new instance of AssignMethodAttribute.

Namespace:  Cauldron.Interception
Assembly:  Cauldron.Interception (in Cauldron.Interception.dll) Version: 1.0.0
Syntax
public AssignMethodAttribute(
	string methodName,
	bool optional = false
)

Parameters

methodName
Type: SystemString
The name of the method to find and assign to the field. The methodName can contain the following placeholders:
{Name} - This will be replaced by the name of the property or method. A field requires a additional suffix 'Property'.
{ReturnType} - This will be replaced by the return type of the property, method or field.
{CtorArgument:index} - This will be replaced by the string passed to the interceptor. The index is a 32-bit unsigned integer 0-based index of the constructor arguments.
{CtorArgument:parameterName} - This will be replaced by the string passed to the interceptor. For usage examples see AssignMethodAttribute.

optional (Optional)
Type: SystemBoolean
If false, throws an error if the method decribed by methodName is not found; otherwise no error is thrown.
See Also