Example #1
0
        /// <summary>
        /// Creates either a deep or a shallow copy, depending on the value of the <c>deepCopy</c> field.
        /// </summary>
        /// <param name="parent">The parent <see cref="DataItem">DataItem</see> of the copy.</param>
        public virtual DataColumn Clone(DataItem parent)
        {
            DataColumn r = new DataColumn(parent);

            r.CopyFrom(this);
            return(r);
        }
Example #2
0
        /// <summary>
        /// The Serialization routine of the class.
        /// </summary>
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("color", color);
            info.AddValue("name", name);
            info.AddValue("model", model);
            info.AddValue("length", length);
            info.AddValue("loadsource", loadsource);
            info.AddValue("lines", lines);
            info.AddValue("marks", marks);
            bool xdeep = x.deepCopy, ydeep = y.deepCopy, dxdeep = dx.deepCopy, dydeep = dy.deepCopy;

            x.deepCopy = false; y.deepCopy = false; dx.deepCopy = false; dy.deepCopy = false;
            DataColumn rx = new DataColumn(this), ry = new DataColumn(this),
                       rdx = new DataColumn(this), rdy = new DataColumn(this);

            rx.CopyFrom(x); ry.CopyFrom(y); rdx.CopyFrom(dx); rdy.CopyFrom(dy);
            info.AddValue("x", rx);
            info.AddValue("y", ry);
            info.AddValue("dx", rdx);
            info.AddValue("dy", rdy);
            x.deepCopy = xdeep; y.deepCopy = ydeep; dx.deepCopy = dxdeep; dy.deepCopy = dydeep;
        }
Example #3
0
		/// <summary>
		/// The Serialization routine of the class.
		/// </summary>
		public void GetObjectData(SerializationInfo info, StreamingContext context) {
			info.AddValue("color", color);
			info.AddValue("name", name);
			info.AddValue("model", model);
			info.AddValue("length", length);
			info.AddValue("loadsource", loadsource);
			info.AddValue("lines", lines);
			info.AddValue("marks", marks);
			bool xdeep = x.deepCopy, ydeep = y.deepCopy, dxdeep = dx.deepCopy, dydeep = dy.deepCopy;
			x.deepCopy = false; y.deepCopy = false; dx.deepCopy = false; dy.deepCopy = false;
			DataColumn rx = new DataColumn(this), ry = new DataColumn(this),
				rdx = new DataColumn(this), rdy = new DataColumn(this);
			rx.CopyFrom(x); ry.CopyFrom(y); rdx.CopyFrom(dx); rdy.CopyFrom(dy);
			info.AddValue("x", rx);
			info.AddValue("y", ry);
			info.AddValue("dx", rdx);
			info.AddValue("dy", rdy);
			x.deepCopy = xdeep; y.deepCopy = ydeep; dx.deepCopy = dxdeep; dy.deepCopy = dydeep;
		}
Example #4
0
		/// <summary>
		/// Creates either a deep or a shallow copy, depending on the value of the <c>deepCopy</c> field.
		/// </summary>
		/// <param name="parent">The parent <see cref="DataItem">DataItem</see> of the copy.</param>
		public virtual DataColumn Clone(DataItem parent) {
			DataColumn r = new DataColumn(parent);
			r.CopyFrom(this);
			return r;
		}