Class HasCustomAttributeExtensions
- Namespace
- AsmResolver.DotNet
- Assembly
- AsmResolver.DotNet.dll
Provides extensions for various metadata members.
public static class HasCustomAttributeExtensions
- Inheritance
-
HasCustomAttributeExtensions
- Inherited Members
Methods
FindCustomAttributes(IHasCustomAttribute, Utf8String?, Utf8String?)
Finds all custom attributes that were assigned to a metadata member that match a particular namespace and name.
public static IEnumerable<CustomAttribute> FindCustomAttributes(this IHasCustomAttribute self, Utf8String? ns, Utf8String? name)
Parameters
selfIHasCustomAttributeThe metadata member.
nsUtf8StringThe namespace of the attribute type.
nameUtf8StringThe name of the attribute type.
Returns
- IEnumerable<CustomAttribute>
The matching attributes.
FindCustomAttributes(IHasCustomAttribute, string?, string?)
Finds all custom attributes that were assigned to a metadata member that match a particular namespace and name.
public static IEnumerable<CustomAttribute> FindCustomAttributes(this IHasCustomAttribute self, string? ns, string? name)
Parameters
selfIHasCustomAttributeThe metadata member.
nsstringThe namespace of the attribute type.
namestringThe name of the attribute type.
Returns
- IEnumerable<CustomAttribute>
The matching attributes.
HasCustomAttribute(IHasCustomAttribute, Utf8String?, Utf8String?)
Determines whether a metadata member is assigned an attribute that match a particular namespace and name.
public static bool HasCustomAttribute(this IHasCustomAttribute self, Utf8String? ns, Utf8String? name)
Parameters
selfIHasCustomAttributeThe metadata member.
nsUtf8StringThe namespace of the attribute type.
nameUtf8StringThe name of the attribute type.
Returns
- bool
trueif the member has a matching attribute, otherwisefalse.
HasCustomAttribute(IHasCustomAttribute, string?, string?)
Determines whether a metadata member is assigned an attribute that match a particular namespace and name.
public static bool HasCustomAttribute(this IHasCustomAttribute self, string? ns, string? name)
Parameters
selfIHasCustomAttributeThe metadata member.
nsstringThe namespace of the attribute type.
namestringThe name of the attribute type.
Returns
- bool
trueif the member has a matching attribute, otherwisefalse.
IsCompilerGenerated(IHasCustomAttribute)
Indicates whether the specified member is compiler generated.
public static bool IsCompilerGenerated(this IHasCustomAttribute self)
Parameters
selfIHasCustomAttributeThe referenced member to check
Returns
- bool
trueif the member was generated by the compiler, otherwisefalse