示例#1
0
文件: Sector.cs 项目: volpav/toprope
 /// <summary>
 /// Initializes a new instance of an object.
 /// </summary>
 /// <param name="copyFrom">Object to copy state from.</param>
 /// <exception cref="System.ArgumentNullException"><paramref name="copyFrom">copyFrom</paramref> is null.</exception>
 public Sector(Place copyFrom)
     : base(copyFrom)
 {
 }
示例#2
0
文件: Place.cs 项目: volpav/toprope
 /// <summary>
 /// Initializes a new instance of an object.
 /// </summary>
 /// <param name="copyFrom">Object to copy state from.</param>
 /// <exception cref="System.ArgumentNullException"><paramref name="copyFrom">copyFrom</paramref> is null.</exception>
 public Place(Place copyFrom)
 {
     if (copyFrom == null)
         throw new System.ArgumentNullException("copyFrom");
     else
         copyFrom.CopyTo(this);
 }
示例#3
0
文件: Area.cs 项目: volpav/toprope
 /// <summary>
 /// Initializes a new instance of an object.
 /// </summary>
 /// <param name="copyFrom">Object to copy state from.</param>
 /// <exception cref="System.ArgumentNullException"><paramref name="copyFrom">copyFrom</paramref> is null.</exception>
 public Area(Place copyFrom)
     : base(copyFrom)
 {
 }
示例#4
0
文件: Place.cs 项目: volpav/toprope
        /// <summary>
        /// Copies the state of the current object into the given one.
        /// </summary>
        /// <param name="target">Target object.</param>
        /// <exception cref="System.ArgumentNullException"><paramref name="target">target</paramref> is null.</exception>
        public void CopyTo(Place target)
        {
            if (target == null)
                throw new System.ArgumentNullException("target");
            else
            {
                target.Id = this.Id;
                target.Name = this.Name;
                target.Description = this.Description;

                if (this.Location != null)
                    target.Location = new Location(this.Location);
                else
                    target.Location = null;

                if (this.Tags != null)
                    target.Tags = new List<string>(this.Tags);
                else
                    target.Tags = null;

                target.Season = this.Season;
                target.Climbing = this.Climbing;
                target.Origin = this.Origin;
            }
        }