CustomAttribute
Contains static methods for retrieving custom attributes.
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace DotNext.Reflection
{
public static class CustomAttribute
{
[System.Runtime.CompilerServices.NullableContext(1)]
public static bool IsDefined<[System.Runtime.CompilerServices.Nullable(0)] TAttribute>(this ICustomAttributeProvider member, bool inherit = false) where TAttribute : Attribute
{
return member.IsDefined(typeof(TAttribute), inherit);
}
}
}