DataUrlAppendTextTo(StringBuilder, String, MimeType, DataEncoding) Method

Appends embedded text as "data" URL (RFC 2397) to the end of a StringBuilder.

Definition

Namespace: FolkerKinzel.DataUrls
Assembly: FolkerKinzel.DataUrls (in FolkerKinzel.DataUrls.dll) Version: 1.0.0+b1c843815044ca6fd87a144c9ff16386002c6473
C#
public static StringBuilder AppendTextTo(
	StringBuilder builder,
	string? text,
	MimeType mimeType,
	DataEncoding encoding = DataEncoding.Url
)

Parameters

builder  StringBuilder
The StringBuilder to which a "data" URL is appended.
text  String
The text to embed in the "data" URL. text MUST not be passed URL-encoded.
mimeType  MimeType
The MimeType of the text.
encoding  DataEncoding  (Optional)
The encoding to use to embed the text.

Return Value

StringBuilder
A reference to builder.

Exceptions

ArgumentNullExceptionbuilder or mimeType is null.
FormatExceptiontext could not URL-encoded.

See Also