File size: 2,787 Bytes
fab29d7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | using System;
namespace VersOne.Epub.Schema
{
/// <summary>
/// <para>Navigation header associated with a <see cref="Epub3NavLi" /> (represented by the <span> HTML tag in the navigation document).</para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#sec-nav-def-model" /> for more information.</para>
/// </summary>
public class Epub3NavSpan
{
/// <summary>
/// Initializes a new instance of the <see cref="Epub3NavSpan" /> class.
/// </summary>
/// <param name="text">The textual content of the navigation header (represented by the inner content of the <span> HTML tag in the navigation document).</param>
/// <param name="title">
/// The alternative title of the navigation header (represented by the 'title' HTML attribute in the navigation document)
/// or <c>null</c> if the alternative title is not specified.
/// </param>
/// <param name="alt">
/// The alternative text of the navigation header (represented by the 'title' HTML attribute in the navigation document)
/// or <c>null</c> if the alternative text is not specified.
/// </param>
/// <exception cref="ArgumentNullException">The <paramref name="text" /> parameter is <c>null</c>.</exception>
public Epub3NavSpan(string text, string? title, string? alt = null)
{
Text = text ?? throw new ArgumentNullException(nameof(text));
Title = title;
Alt = alt;
}
/// <summary>
/// <para>Gets the textual content of the navigation header (represented by the inner content of the <span> HTML tag in the navigation document).</para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#sec-nav-def-model" /> for more information.</para>
/// </summary>
public string Text { get; }
/// <summary>
/// <para>
/// Gets the alternative title of the navigation header (represented by the 'title' HTML attribute in the navigation document)
/// or <c>null</c> if the alternative title is not specified.
/// </para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#sec-nav-def-model" /> for more information.</para>
/// </summary>
public string? Title { get; }
/// <summary>
/// <para>
/// Gets the alternative text of the navigation header (represented by the 'title' HTML attribute in the navigation document)
/// or <c>null</c> if the alternative text is not specified.
/// </para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#sec-nav-def-model" /> for more information.</para>
/// </summary>
public string? Alt { get; }
}
}
|