Table of Contents

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 IHasCustomAttribute

The metadata member.

ns Utf8String

The namespace of the attribute type.

name Utf8String

The 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 IHasCustomAttribute

The metadata member.

ns string

The namespace of the attribute type.

name string

The 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 IHasCustomAttribute

The metadata member.

ns Utf8String

The namespace of the attribute type.

name Utf8String

The name of the attribute type.

Returns

bool

true if the member has a matching attribute, otherwise false.

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 IHasCustomAttribute

The metadata member.

ns string

The namespace of the attribute type.

name string

The name of the attribute type.

Returns

bool

true if the member has a matching attribute, otherwise false.

IsCompilerGenerated(IHasCustomAttribute)

Indicates whether the specified member is compiler generated.

public static bool IsCompilerGenerated(this IHasCustomAttribute self)

Parameters

self IHasCustomAttribute

The referenced member to check

Returns

bool

true if the member was generated by the compiler, otherwise false