We have general API design documentation, which contains some
description on properties:
http://docs.xamarin.com/android/advanced_topics/api_design#Properties
Some advanced notes: setter properties are not generated if
- the setter method returns non-void setter: this often happens to
"fluent" API.
- the setter method has different member accessibility from the
corresponding getter.
- the setter parameter (only one is allowed) is of different type
from the getter.
- any one of its base types has the *base* setter method that is
*not* mapped to a setter: this is required for override resolution.
Getters have less restrictions, though the base restriction also applies.
Also note the API Levels: some getter or setter methods might be
available only in the later API Levels.
If you have questions on some specific methods, please feel free to ask us.
Atsushi Eno
Tom Opgenorth wrote:
In general, Java setters/getters will be transformed into C#
properties where possible. As you noticed, some of them don't - this
has to do with the semantics surrounding the getter/setter. For
example, sometimes a Java getter/setter may be overloaded to accept
different parameters - in that case the Java method will be mapped as
a C# method and not a property.
I'm not to sure if you can (or should) force the Java getter to a C#
property in this case. Maybe Jonathan or Eno can shed some light here?
On Tue, Sep 18, 2012 at 11:43 AM, Jeremy A. Kolb - ARA/NED
<[email protected] <mailto:[email protected]>> wrote:
I’ve noticed that not all of the Get/Set methods in jars become
properties. Sometimes none of them do and sometimes only the Get
or Set gets mapped. How do I ensure these methods get mapped to C#
properties?
Jeremy
_______________________________________________
Monodroid mailing list
[email protected] <mailto:[email protected]>
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
--
http://www.opgenorth.net
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid