/// <summary> /// Sets the content to the <see cref="string"/> value. The value is treated as HTML encoded as-provided, and /// no further encoding will be performed. /// </summary> /// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param> /// <param name="encoded">The HTML encoded <see cref="string"/> that replaces the content.</param> /// <returns>The <see cref="IHtmlContentBuilder"/>.</returns> public static IHtmlContentBuilder SetHtmlContent(this IHtmlContentBuilder builder, string encoded) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } builder.Clear(); builder.AppendHtml(encoded); return(builder); }
/// <summary> /// Sets the content to the <see cref="string"/> value. The value is treated as HTML encoded as-provided, and /// no further encoding will be performed. /// </summary> /// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param> /// <param name="content">The HTML encoded <see cref="string"/> that replaces the content.</param> /// <returns>The <see cref="IHtmlContentBuilder"/>.</returns> public static IHtmlContentBuilder SetContentEncoded(this IHtmlContentBuilder builder, string encoded) { builder.Clear(); builder.AppendEncoded(encoded); return(builder); }
/// <summary> /// Sets the content to the <see cref="IHtmlContent"/> value. /// </summary> /// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param> /// <param name="value">The <see cref="IHtmlContent"/> value that replaces the content.</param> /// <returns>The <see cref="IHtmlContentBuilder"/>.</returns> public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, IHtmlContent content) { builder.Clear(); builder.Append(content); return(builder); }