示例#1
0
        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);
        }
示例#3
0
        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);
        }