コード例 #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdStrongEmphasisSpan"/> with the specified content.
 /// </summary>
 /// <param name="text">The text to emphasize</param>
 public MdStrongEmphasisSpan(MdSpan text) =>
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdImageSpan"/>.
 /// </summary>
 /// <param name="description">The image's description</param>
 /// <param name="uri">The image's uri. Value must be a valid absolute or relative <see cref="System.Uri"/></param>
 public MdImageSpan(MdSpan description, string uri) : this(description, new Uri(uri, UriKind.RelativeOrAbsolute))
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdImageSpan"/>.
 /// </summary>
 /// <param name="description">The image's description</param>
 /// <param name="uri">The image's uri</param>
 public MdImageSpan(MdSpan description, Uri uri)
 {
     Description = description ?? throw new ArgumentNullException(nameof(description));
     Uri         = uri ?? throw new ArgumentNullException(nameof(uri));
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdEmphasisSpan"/> with the specified content.
 /// </summary>
 /// <param name="text">The text to emphasize.</param>
 public MdEmphasisSpan(MdSpan text)
 {
     Text = text ?? throw new ArgumentNullException(nameof(text));
 }
コード例 #5
0
 // private protected constructor => class cannot be derived from outside this assembly
 private protected MdListItemBase(MdSpan content) : this(new MdParagraph(content))
 {
 }
コード例 #6
0
 /// <summary>
 /// Creates a new instance of <see cref="MdParagraph"/> with the specified content.
 /// </summary>
 /// <param name="text">The paragraph's content</param>
 public static MdParagraph Paragraph(MdSpan text) => new MdParagraph(text !);
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdSingleLineSpan"/>.
 /// </summary>
 /// <param name="content">The spans content</param>
 public MdSingleLineSpan(MdSpan content) =>
コード例 #8
0
 /// <summary>
 /// Creates a new instance of <see cref="MdHeading"/>
 /// </summary>
 /// <param name="text">The text of the heading. Must not be null.</param>
 /// <param name="level">The heading's level. Value must be in the range [1,6]</param>
 public static MdHeading Heading(MdSpan text, int level) => new MdHeading(text, level);
コード例 #9
0
 /// <summary>
 /// Creates a new instance of <see cref="MdHeading"/>
 /// </summary>
 /// <param name="level">The heading's level. Value must be in the range [1,6]</param>
 /// <param name="text">The text of the heading. Must not be null.</param>
 public static MdHeading Heading(int level, MdSpan text) => new MdHeading(level, text);
コード例 #10
0
 /// <summary>
 /// Creates a new instance of <see cref="MdBlockQuote"/> with the specified content
 /// </summary>
 /// <param name="content">
 /// The content of the quote as a span (see <see cref="MdSpan"/>.
 /// The span will automatically be wrapped in an instance of <see cref="MdParagraph"/>
 /// </param>
 public static MdBlockQuote BlockQuote(MdSpan content) => new MdBlockQuote(content);
コード例 #11
0
 /// <summary>
 /// Creates a new instance of <see cref="MdListItem"/> containing the specified span
 /// </summary>
 /// <param name="content">
 /// The list item's content as a <see cref="MdSpan"/>.
 /// The span will implicitly be wrapped in a instance of see <see cref="MdParagraph"/>
 /// </param>
 public static MdListItem ListItem(MdSpan content) => new MdListItem(content);
コード例 #12
0
 /// <summary>
 /// Initializes a new instance of <see cref="MdBlockQuote"/> with the specified content
 /// </summary>
 /// <param name="content">
 /// The content of the quote as a span (see <see cref="MdSpan"/>.
 /// The span will automatically be wrapped in an instance of <see cref="MdParagraph"/>
 /// </param>
 public MdBlockQuote(MdSpan content) : this(new MdParagraph(content))
 {
 }