Click or drag to resize

MethodRefGetDelegateParameterType Method (Object, Int32, Expression)

Determine the delegate type of the parameter of the specified method object with the specified argument index.

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public static TypeRefBase GetDelegateParameterType(
	Object obj,
	int parameterIndex,
	Expression parentExpression
)

Parameters

obj
Type: SystemObject
The code object (an IParameters CodeObject, MethodInfo, ConstructorInfo, or PropertyInfo for an indexer; or an IVariableDecl CodeObject, FieldInfo, PropertyInfo, or EventInfo that has a delegate type).
parameterIndex
Type: SystemInt32
The index of the parameter.
parentExpression
Type: Nova.CodeDOMExpression
The parent expression of the code object.

Return Value

Type: TypeRefBase
The TypeRefBase representing the delegate type of the parameter, otherwise null.
Remarks
This method cannot and does not adjust the index if the passed object is an extension method, because it can't know if the call context provides the first argument implicitly or explicitly.
See Also