GetDeclarationsUsedByMethod(MethodBase)
Gets all declarations (Type, FieldInfo, MethodInfo or ConstructorInfo) used by the body of a given method or constructor.
Declaration
public static MethodUsageCodeReference[] GetDeclarationsUsedByMethod(MethodBase method)Parameters
| Type | Name | Description |
|---|---|---|
| MethodBase | method | A MethodInfo or ConstructorInfo. |
Returns
| Type | Description |
|---|---|
| MethodUsageCodeReference[] | An array of MethodUsageCodeReference containing one
item for each declaration used by the body of |
Remarks
<p>
note
This feature is available only at build time.
GetDeclarationsUsedByMethod(MethodBase, ReflectionSearchOptions)
Gets all declarations (Type, FieldInfo, MethodInfo or ConstructorInfo) used by the body of a given method or constructor and specifies additional options.
Declaration
public static MethodUsageCodeReference[] GetDeclarationsUsedByMethod(MethodBase method, ReflectionSearchOptions options)Parameters
| Type | Name | Description |
|---|---|---|
| MethodBase | method | A MethodInfo or ConstructorInfo. |
| ReflectionSearchOptions | options | This parameter has no effect and is kept only for backwards compatibility. |
Returns
| Type | Description |
|---|---|
| MethodUsageCodeReference[] | An array of MethodUsageCodeReference containing one
item for each declaration used by the body of |
Remarks
<p>
note
This feature is available only at build time.