示例#1
0
        /// <summary>
        /// Copies all the properties of the <paramref name="fromDikeProfile"/> to
        /// the current instance.
        /// </summary>
        /// <param name="fromDikeProfile">The dike profile to copy the properties
        /// from.</param>
        /// <exception cref="ArgumentNullException">Thrown when
        /// <paramref name="fromDikeProfile"/> is <c>null</c>.</exception>
        public void CopyProperties(DikeProfile fromDikeProfile)
        {
            if (fromDikeProfile == null)
            {
                throw new ArgumentNullException(nameof(fromDikeProfile));
            }

            SetGeometry(fromDikeProfile.DikeGeometry);
            DikeHeight = fromDikeProfile.DikeHeight;
            CopyForeshoreProfileProperties(fromDikeProfile);
        }
示例#2
0
 private void CopyForeshoreProfileProperties(DikeProfile fromDikeProfile)
 {
     ForeshoreProfile.CopyProperties(new ForeshoreProfile(fromDikeProfile.WorldReferencePoint,
                                                          fromDikeProfile.ForeshoreGeometry,
                                                          fromDikeProfile.BreakWater,
                                                          new ForeshoreProfile.ConstructionProperties
     {
         Id          = fromDikeProfile.Id,
         Name        = fromDikeProfile.Name,
         Orientation = fromDikeProfile.Orientation,
         X0          = fromDikeProfile.X0
     }));
 }
示例#3
0
 private bool Equals(DikeProfile other)
 {
     return(Equals(ForeshoreProfile, other.ForeshoreProfile) &&
            DikeHeight.Equals(other.DikeHeight) &&
            EqualDikeGeometry(other.DikeGeometry));
 }