Example #1
0
        public InnerBorder DeepCloneWithEdges(InnerBorderEdges edges)
        {
            var result = new InnerBorder(
                this.Weight.DeepClone(),
                this.Style.DeepClone(),
                this.Color.DeepClone(),
                edges);

            return(result);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="InnerBorder"/> 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="edges">The edges to apply the border to.</param>
        public InnerBorder(
            BorderWeight weight,
            BorderStyle style,
            Color color,
            InnerBorderEdges edges)
            : base(weight, style, color)
        {
            if (edges == InnerBorderEdges.None)
            {
                throw new ArgumentOutOfRangeException(Invariant($"{nameof(edges)} is {nameof(InnerBorderEdges.None)}."));
            }

            this.Edges = edges;
        }