Page MenuHomePhabricator

C#: Stylecop CA1721: The property name 'XYZ' is confusing given the existence of method 'GetVisible'. Rename or remove one of these members
Open, NormalPublic

Description

A bunch of properties (all of them?) are generating this warning. Note that the warning complains only about Get methods.

This happens because we generate the property wrappers in terms of their Get methods.

Should it be the case to make the Getter private if they are used in the property wrapper?

There was the issue of multi-valued properties but D9577 added support for it.

lauromoura triaged this task as Normal priority.

As I commented in Z150#4186, I think it is confusing to have both accessors and properties to reach the same data, specially when properties are not always available (because of the presence of multiple values, or keys, or return values). And StyleCop seems to agree with me.
My recommendation is that we stop trying to match C# properties with EO properties and remove the EFL# property wrappers.