/// <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) { }
/// <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); }
/// <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) { }
/// <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; } }