MetalamaAPI documentationAspect APIMetalama.​Framework.​Code­FixesCode­Fix­FactoryChange­Accessibility
Open sandboxFocus

CodeFixFactory.ChangeAccessibility Method

ChangeAccessibility(IMemberOrNamedType, Accessibility, String)

Creates a CodeFix that changes the accessibility of a given type or member.

Declaration
public static CodeFix ChangeAccessibility(IMemberOrNamedType targetMember, Accessibility accessibility, string title = null)
Parameters
Type Name Description
IMemberOrNamedType targetMember

The type or member whose accessibility must be changed.

Accessibility accessibility

The new accessibility.

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