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(string)](#DataUrlBytes_string)
- Deprecated: Renamed to DataUriBytes.[DataUrlMediaType(string)](#DataUrlMediaType_string)
- Deprecated: Renamed to DataUriMediaType.[MakeDataUrl(byte[], PeterO.Mail.MediaType)](#MakeDataUrl_byte_PeterO_Mail_MediaType)
- Deprecated: Renamed to MakeDataUri.[MakeDataUrl(string)](#MakeDataUrl_string)
- Deprecated: Renamed to MakeDataUri.
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:
- url: A data URI.
Return Value:
The data as a byte array. Returns null if url is null, is syntactically invalid, or is not a data URI.
public static PeterO.Mail.MediaType DataUrlMediaType( string url);
Deprecated. Renamed to DataUriMediaType.
Extracts the media type from a Data URI (uniform resource identifier).
Parameters:
- url: A data URI.
Return Value:
The media type. Returns null if url is null, is syntactically invalid, or is not a Data URI.
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:
-
bytes: A byte array containing the data to encode in a Data URI.
-
mediaType: A media type to assign to the data.
Return Value:
A Data URI that encodes the given data and media type.
Exceptions:
- System.ArgumentNullException: The parameter bytes or mediaType is null.
public static string MakeDataUrl( string textString);
Deprecated. Renamed to MakeDataUri.
Encodes text as a Data URI (uniform resource identifier).
Parameters:
- textString: A text string to encode as a data URI.
Return Value:
A Data URI that encodes the given text.
Exceptions:
- System.ArgumentNullException: The parameter textString is null.