GetCustomAttributesOnTarget(object)
In Metalama, use IDeclaration.Attributes.
Declaration
public static CustomAttributeInstance[] GetCustomAttributesOnTarget(object target)Parameters
| Type | Name | Description |
|---|---|---|
| object | target |
Returns
| Type | Description |
|---|---|
| CustomAttributeInstance[] |
GetCustomAttributesOnTarget(object, ReflectionSearchOptions)
In Metalama, use IDeclaration.Attributes.
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)
In Metalama, use IDeclaration.Attributes.
Declaration
public static IList<T> GetCustomAttributesOnTarget<T>(object target, ReflectionSearchOptions options = ReflectionSearchOptions.IncludeDerivedTypes) where T : AttributeParameters
| Type | Name | Description |
|---|---|---|
| object | target | |
| ReflectionSearchOptions | options |
Returns
| Type | Description |
|---|---|
| IList<T> |
Type Parameters
| Name | Description |
|---|---|
| T |