PostSharpAPI ReferencePost­Sharp.​ReflectionReflection­SearchGet­Members­Of­Type
Open sandboxFocus

ReflectionSearch.GetMembersOfType Method

GetMembersOfType(Type)

Gets all members (System.Reflection.FieldInfo, System.Reflection.PropertyInfo, or ParameterInfo) of the assembly being processed of a given type.

Declaration
public static MemberTypeCodeReference[] GetMembersOfType(Type memberType)
Parameters
Type Name Description
System.Type memberType

Member type.

Returns
Type Description
MemberTypeCodeReference[]

The set of all members of type memberType in the assembly being processed

Remarks

note

This feature is available only at build time.

GetMembersOfType(Type, ReflectionSearchOptions)

Gets all members (System.Reflection.FieldInfo, System.Reflection.PropertyInfo, or ParameterInfo) of the assembly being processed of a given type and specifies additional options.

Declaration
public static MemberTypeCodeReference[] GetMembersOfType(Type memberType, ReflectionSearchOptions options)
Parameters
Type Name Description
System.Type memberType

Member type.

ReflectionSearchOptions options

Either IncludeTypeElement or None.

Returns
Type Description
MemberTypeCodeReference[]

The set of all members of type memberType in the assembly being processed

Remarks

note

This feature is available only at build time.