Metalama 1.0 / / Metalama Documentation / Aspect API Documentation / Metalama.​Framework.​Advising / IAdvice­Factory / Remove­Attributes

Method RemoveAttributes

RemoveAttributes(IDeclaration, INamedType)

Removes all custom attributes of a given INamedType from a given declaration.

Declaration
IRemoveAttributesAdviceResult RemoveAttributes(IDeclaration targetDeclaration, INamedType attributeType)
Parameters
Type Name Description
IDeclaration targetDeclaration

The declaration from which custom attributes have to be removed.

INamedType attributeType

The type of custom attributes to be removed.

Returns
Type Description
IRemoveAttributesAdviceResult

RemoveAttributes(IDeclaration, Type)

Removes all custom attributes of a given Type from a given declaration.

Declaration
IRemoveAttributesAdviceResult RemoveAttributes(IDeclaration targetDeclaration, Type attributeType)
Parameters
Type Name Description
IDeclaration targetDeclaration

The declaration from which custom attributes have to be removed.

Type attributeType

The type of custom attributes to be removed.

Returns
Type Description
IRemoveAttributesAdviceResult