CodeFixFactory.RemoveAttributes Method
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 System.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. |
System.Type | attributeType | The type of the attribute. |
System.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. |
System.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 |