DataUrlAppendTextTo(StringBuilder, String, String, 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,
	string? mimeType = "text/plain",
	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  String  (Optional)
The Internet Media Type of the text, or null for DefaultMediaType.
encoding  DataEncoding  (Optional)
The encoding to use to embed the text.

Return Value

StringBuilder
A reference to builder.

Exceptions

ArgumentNullExceptionbuilder is null.
FormatExceptiontext could not URL-encoded.

See Also