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
self
IHasCustomAttributeThe metadata member.
ns
Utf8StringThe namespace of the attribute type.
name
Utf8StringThe 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
self
IHasCustomAttributeThe metadata member.
ns
stringThe namespace of the attribute type.
name
stringThe 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
self
IHasCustomAttributeThe metadata member.
ns
Utf8StringThe namespace of the attribute type.
name
Utf8StringThe name of the attribute type.
Returns
- bool
true
if 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
self
IHasCustomAttributeThe metadata member.
ns
stringThe namespace of the attribute type.
name
stringThe name of the attribute type.
Returns
- bool
true
if 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
self
IHasCustomAttributeThe referenced member to check
Returns
- bool
true
if the member was generated by the compiler, otherwisefalse