-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Mapping_MappingSchema_GetAttribute__1
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
Returns custom attribute applied to provided type member.
Namespace: CodeJam.Mapping
Assembly: CodeJam.Blocks (in CodeJam.Blocks.dll) Version: 2.0.0.0
C#
public T GetAttribute<T>(
MemberInfo memberInfo,
bool inherit = true
)
where T : Attribute
VB
Public Function GetAttribute(Of T As Attribute) (
memberInfo As MemberInfo,
Optional inherit As Boolean = true
) As T
F#
member GetAttribute :
memberInfo : MemberInfo *
?inherit : bool
(* Defaults:
let _inherit = defaultArg inherit true
*)
-> 'T when 'T : Attribute
- memberInfo
- Type: System.Reflection.MemberInfo
Type member. - inherit (Optional)
- Type: System.Boolean
true to search this member's inheritance chain to find the attributes; otherwise, false.
- T
- The type of attribute to search for. Only attributes that are assignable to this member are returned.
Type: T
A custom attribute or null.
MappingSchema Class
GetAttribute Overload
CodeJam.Mapping Namespace