Example #1
0
 /// <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)
 {
 }
Example #2
0
 /// <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);
 }
Example #3
0
 /// <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)
 {
 }
Example #4
0
        /// <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;
            }
        }