public ObjectInfo(Object @object) { if (@object == null) { throw new ArgumentNullException("object"); } var properties = @object.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); var table = new Table((uint)properties.Length, 2, false); uint row = 0; foreach (var property in properties) { table.Attach(new Label(property.Name), 0, 1, row, row + 1); var value = property.GetValue(@object, null); if (value == null) { value = ""; } table.Attach(new Label(value.ToString()), 1, 2, row, row + 1); row++; } Add(table); ShowAll(); }
public ObjectInfo (Object @object, string path) { if (@object == null) { throw new ArgumentNullException ("object"); } this.@object = @object; this.path = path; }
public ObjectInfo(Object @object, string path) { if (@object == null) { throw new ArgumentNullException("object"); } this.@object = @object; this.path = path; }
public ObjectInfo (Object @object) { if (@object == null) { throw new ArgumentNullException ("object"); } var properties = @object.GetType ().GetProperties (BindingFlags.Instance | BindingFlags.Public); var table = new Table ((uint)properties.Length, 2, false); uint row = 0; foreach (var property in properties) { table.Attach (new Label (property.Name), 0, 1, row, row + 1); var value = property.GetValue (@object, null); if (value == null) { value = ""; } table.Attach (new Label (value.ToString ()), 1, 2, row, row + 1); row++; } Add (table); ShowAll (); }
public ObjectInfo(Object @object) : this(@object, null) { }
public ObjectInfo (Object @object) : this (@object, null) { }