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, 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, string?, string?)
Determines whether a metadata member is assigned an attributes 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
The matching attributes.
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