Code Inspection: Member can be made protected (non-private accessibility)
JetBrains Rider is smart enough to determine where a particular class member is actually being used. If it isn’t used outside the type or derived types, JetBrains Rider will offer to mark the member as
private. If the member is used in derived classes too, JetBrains Rider will offer to mark it as
Please note that these recommendations need to be considered before being automatically applied. After all, you may be creating a public API, or you may be making types intended to be accessed in non-standard ways (e.g., reflection). In this case, constraining visibility might not be a good idea. If necessary, you can always suppress the inspection.
The best way to suppress JetBrains Rider inspections for an implicitly used public symbol is to mark this symbol with either [UsedImplicitly] or [PublicApi] attribute from the JetBrains.Annotations namespace.
You can also suppress these inspections with any custom attribute. To do so, mark the definition of this attribute with [MeansImplicitUse] attribute.