Skip to content

Commit

Permalink
patterns in Box.Size*. xml docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyagusev committed Dec 14, 2019
1 parent 9bbf766 commit a831202
Showing 1 changed file with 40 additions and 16 deletions.
56 changes: 40 additions & 16 deletions src/BookFx/Box.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,36 +145,60 @@ public class Box
public Box Style(BoxStyle boxStyle) => Get.With(style: boxStyle.Get);

/// <summary>
/// Define heights of rows.
/// <para>Define heights of rows.</para>
/// <para>
/// Since a box can cover a few rows, the method takes a pattern of sizes.
/// The pattern repeats throughout the box height and defines all row heights of the box.
/// <code>Make.Value().SizeRows(new[] { 10, 20 }).SpanRows(5)</code>
/// will define the following row sizes: 10, 20, 10, 20, 10.
/// </para>
/// </summary>
/// <param name="sizes">Sizes of rows.</param>
/// <param name="pattern">A pattern of row sizes.</param>
[Pure]
public Box SizeRows(IEnumerable<TrackSize> sizes) => Get.With(rowSizes: sizes);
public Box SizeRows(IEnumerable<TrackSize> pattern) => Get.With(rowSizes: pattern);

/// <summary>
/// Define heights of rows.
/// <para>Define heights of rows.</para>
/// <para>
/// Since a box can cover a few rows, the method takes a pattern of sizes.
/// The pattern repeats throughout the box height and defines all row heights of the box.
/// <code>Make.Value().SizeRows(10, 20).SpanRows(5)</code>
/// will define the following row sizes: 10, 20, 10, 20, 10.
/// </para>
/// </summary>
/// <param name="size">A size of the first row.</param>
/// <param name="others">Sizes of other rows.</param>
/// <param name="firstPatternPart">The first part of a pattern of row sizes.</param>
/// <param name="otherPatternParts">Other parts of a pattern of row sizes.</param>
[Pure]
public Box SizeRows(TrackSize size, params TrackSize[] others) =>
Get.With(rowSizes: others.Prepend(size));
public Box SizeRows(TrackSize firstPatternPart, params TrackSize[] otherPatternParts) =>
Get.With(rowSizes: otherPatternParts.Prepend(firstPatternPart));

/// <summary>
/// Define widths of columns.
/// <para>Define widths of columns.</para>
/// <para>
/// Since a box can cover a few columns, the method takes a pattern of sizes.
/// The pattern repeats throughout the box width and defines all column widths of the box.
/// <code>Make.Value().SizeCols(new[] { 10, 20 }).SpanCols(5)</code>
/// will define the following column sizes: 10, 20, 10, 20, 10.
/// </para>
/// </summary>
/// <param name="sizes">Sizes of columns.</param>
/// <param name="pattern">A pattern of column sizes.</param>
[Pure]
public Box SizeCols(IEnumerable<TrackSize> sizes) => Get.With(colSizes: sizes);
public Box SizeCols(IEnumerable<TrackSize> pattern) => Get.With(colSizes: pattern);

/// <summary>
/// Define widths of columns.
/// <para>Define widths of columns.</para>
/// <para>
/// Since a box can cover a few columns, the method takes a pattern of sizes.
/// The pattern repeats throughout the box width and defines all column widths of the box.
/// <code>Make.Value().SizeCols(10, 20).SpanCols(5)</code>
/// will define the following column sizes: 10, 20, 10, 20, 10.
/// </para>
/// </summary>
/// <param name="size">A size of the first column.</param>
/// <param name="others">Sizes of other columns.</param>
/// <param name="firstPatternPart">The first part of a pattern of column sizes.</param>
/// <param name="otherPatternParts">Other parts of a pattern of column sizes.</param>
[Pure]
public Box SizeCols(TrackSize size, params TrackSize[] others) =>
Get.With(colSizes: others.Prepend(size));
public Box SizeCols(TrackSize firstPatternPart, params TrackSize[] otherPatternParts) =>
Get.With(colSizes: otherPatternParts.Prepend(firstPatternPart));

/// <summary>
/// Define print area by the box.
Expand Down

0 comments on commit a831202

Please sign in to comment.