Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions MonoTouch.Dialog/Reflect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public class HtmlAttribute : Attribute {}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class SkipAttribute : Attribute {}

[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct, Inherited=false)]
public class SkipNonPublicAttribute : Attribute {}

[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class PasswordAttribute : EntryAttribute {
public PasswordAttribute (string placeholder) : base (placeholder) {}
Expand Down Expand Up @@ -199,8 +202,11 @@ public BindingContext (object callbacks, object o, string title)
void Populate (object callbacks, object o, RootElement root)
{
MemberInfo last_radio_index = null;
var members = o.GetType ().GetMembers (BindingFlags.DeclaredOnly | BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.Instance);

BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance;
if (Attribute.GetCustomAttribute(o.GetType (), typeof(SkipNonPublicAttribute)) == null)
flags |= BindingFlags.NonPublic;
var members = o.GetType ().GetMembers (flags);

Section section = null;

Expand Down