RemoveAttributes(IDeclaration, Type, string?)
Creates a CodeFix that removes all custom attributes of a given type from a declaration and all container declarations, by specifying the reflection Type of the attribute.
Declaration
public static CodeFix RemoveAttributes(IDeclaration targetDeclaration, Type attributeType, string? title = null)
Parameters
Type | Name | Description |
---|---|---|
IDeclaration | targetDeclaration | The declaration from which the attribute must be removed. |
Type | attributeType | The type of the attribute. |
string | title | An optional title of the CodeFix, displayed to the user in the light bulb or refactoring menu. When not specified, the title is generated from the other parameters. |
Returns
Type | Description |
---|---|
CodeFix |
RemoveAttributes(IDeclaration, INamedType, string?)
Creates a CodeFix that removes all custom attributes of a given type from a declaration and all container declarations, by specifying the INamedType of the attribute.
Declaration
public static CodeFix RemoveAttributes(IDeclaration targetDeclaration, INamedType attributeType, string? title = null)
Parameters
Type | Name | Description |
---|---|---|
IDeclaration | targetDeclaration | The declaration from which the attribute must be removed. |
INamedType | attributeType | The type of the attribute. |
string | title | An optional title of the CodeFix, displayed to the user in the light bulb or refactoring menu. When not specified, the title is generated from the other parameters. |
Returns
Type | Description |
---|---|
CodeFix |