PeterO.Mail.DataUrls

## PeterO.Mail.DataUrls

public static class DataUrls

Deprecated. Renamed to DataUris.

Contains methods for parsing and generating Data URIs (uniform resource identifiers). Data URIs are described in RFC 2397. Examples for Data URIs follow.

data:, hello%20world

data:text/markdown, hello%20world

data:application/octet-stream;base64, AAAAAA==

.

Member Summary

### DataUrlBytes

public static byte[] DataUrlBytes(
    string url);

Deprecated. Renamed to DataUriBytes.

Extracts the data from a Data URI (uniform resource identifier) in the form of a byte array.

Parameters:

Return Value:

The data as a byte array. Returns null if url is null, is syntactically invalid, or is not a data URI.

### DataUrlMediaType

public static PeterO.Mail.MediaType DataUrlMediaType(
    string url);

Deprecated. Renamed to DataUriMediaType.

Extracts the media type from a Data URI (uniform resource identifier).

Parameters:

Return Value:

The media type. Returns null if url is null, is syntactically invalid, or is not a Data URI.

### MakeDataUrl

public static string MakeDataUrl(
    byte[] bytes,
    PeterO.Mail.MediaType mediaType);

Deprecated. Renamed to MakeDataUri.

Encodes data with the given media type in a Data URI (uniform resource identifier).

Parameters:

Return Value:

A Data URI that encodes the given data and media type.

Exceptions:

### MakeDataUrl

public static string MakeDataUrl(
    string textString);

Deprecated. Renamed to MakeDataUri.

Encodes text as a Data URI (uniform resource identifier).

Parameters:

Return Value:

A Data URI that encodes the given text.

Exceptions:

Back to MailLib start page.