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

Method GetMembersOfType

GetMembersOfType(Type)

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

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

Member type.

Returns
Type Description
MemberTypeCodeReference[]

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

GetMembersOfType(Type, ReflectionSearchOptions)

Gets all members (FieldInfo, 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
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