예제 #1
0
        public OuterBorder DeepCloneWithSides(OuterBorderSides sides)
        {
            var result = new OuterBorder(
                this.Weight.DeepClone(),
                this.Style.DeepClone(),
                this.Color.DeepClone(),
                sides);

            return(result);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="OuterBorder"/> class.
        /// </summary>
        /// <param name="weight">The weight of the border.</param>
        /// <param name="style">The style of the border.</param>
        /// <param name="color">The color of the border.</param>
        /// <param name="sides">The sides to apply the border to.</param>
        public OuterBorder(
            BorderWeight weight,
            BorderStyle style,
            Color color,
            OuterBorderSides sides)
            : base(weight, style, color)
        {
            if (sides == OuterBorderSides.None)
            {
                throw new ArgumentOutOfRangeException(Invariant($"{nameof(sides)} is {nameof(OuterBorderSides.None)}."));
            }

            this.Sides = sides;
        }