Class AbpMemberInfoExtensions
Extensions to
Inheritance
System.Object
AbpMemberInfoExtensions
Namespace: System.Reflection
Assembly: Volo.Abp.Core.dll
Syntax
public static class AbpMemberInfoExtensions : object
Methods
GetSingleAttributeOfTypeOrBaseTypesOrNull<TAttribute>(Type, Boolean)
Declaration
public static TAttribute GetSingleAttributeOfTypeOrBaseTypesOrNull<TAttribute>(this Type type, bool inherit = true)
where TAttribute : Attribute
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | |
| System.Boolean | inherit |
Returns
| Type | Description |
|---|---|
| TAttribute |
Type Parameters
| Name | Description |
|---|---|
| TAttribute |
GetSingleAttributeOrNull<TAttribute>(MemberInfo, Boolean)
Gets a single attribute for a member.
Declaration
public static TAttribute GetSingleAttributeOrNull<TAttribute>(this MemberInfo memberInfo, bool inherit = true)
where TAttribute : Attribute
Parameters
| Type | Name | Description |
|---|---|---|
| MemberInfo | memberInfo | The member that will be checked for the attribute |
| System.Boolean | inherit | Include inherited attributes |
Returns
| Type | Description |
|---|---|
| TAttribute | Returns the attribute object if found. Returns null if not found. |
Type Parameters
| Name | Description |
|---|---|
| TAttribute | Type of the attribute |