public ObjectMemberReader(object instance) { Check.IfArgumentNull(instance, "instance"); this.Instance = instance; this.ObjectType = instance.GetType(); this.members = new ObjectMemberList(this.ObjectType); }
/// <summary> /// Constructs a new instance. /// </summary> /// <param name="instance">Must not be null.</param> public ObjectMemberReader(object instance) { Check.IfArgumentNull(instance, nameof(instance)); Instance = instance; ObjectType = instance.GetType(); _members = new ObjectMemberList(ObjectType); }
public ObjectMemberWriter(object instance) { Contract.Requires(instance != null); Check.IfArgumentNull(instance, "instance"); this.Instance = instance; this.ObjectType = instance.GetType(); this.members = new ObjectMemberList(this.ObjectType); }