PostSharp / / API Reference / Post­Sharp.​Reflection / Reflection­Search / Get­Custom­Attributes­On­Target

Method GetCustomAttributesOnTarget

GetCustomAttributesOnTarget(Object)

Declaration
public static CustomAttributeInstance[] GetCustomAttributesOnTarget(object target)
Parameters
Type Name Description
Object target
Returns
Type Description
CustomAttributeInstance[]

GetCustomAttributesOnTarget(Object, ReflectionSearchOptions)

Declaration
public static CustomAttributeInstance[] GetCustomAttributesOnTarget(object target, ReflectionSearchOptions options)
Parameters
Type Name Description
Object target
ReflectionSearchOptions options
Returns
Type Description
CustomAttributeInstance[]

GetCustomAttributesOnTarget<T>(Object, ReflectionSearchOptions)

Declaration
public static IList<T> GetCustomAttributesOnTarget<T>(object target, ReflectionSearchOptions options)
where T : Attribute
Parameters
Type Name Description
Object target
ReflectionSearchOptions options
Returns
Type Description
IList<T>
Type Parameters
Name Description
T