Class MimeTypeNames
- Namespace
- AngleSharp.Io
- Assembly
- AngleSharp.dll
Contains a list of common mime-types.
public static class MimeTypeNames
- Inheritance
-
MimeTypeNames
- Inherited Members
Fields
ApplicationJson
Gets the mime-type for JSON text: application/json.
public static readonly string ApplicationJson
Field Value
ApplicationXHtml
Gets the mime-type for XHTML / XML text: application/xhtml+xml.
public static readonly string ApplicationXHtml
Field Value
ApplicationXml
Gets the mime-type for XML applications: application/xml.
public static readonly string ApplicationXml
Field Value
Binary
Gets the mime-type for raw binary data: application/octet-stream.
public static readonly string Binary
Field Value
Css
Gets the mime-type for a cascading style sheet: text/css.
public static readonly string Css
Field Value
DefaultJavaScript
Gets the default mime-type for JavaScript scripts: text/javascript.
public static readonly string DefaultJavaScript
Field Value
Html
Gets the mime-type for HTML text: text/html.
public static readonly string Html
Field Value
MultipartForm
Gets the mime-type for multipart form data: multipart/form-data.
public static readonly string MultipartForm
Field Value
Plain
Gets the mime-type for plain text: text/plain.
public static readonly string Plain
Field Value
Png
Gets the mime-type for a PNG image: image/png.
public static readonly string Png
Field Value
Svg
Gets the mime-type for SVG text: image/svg+xml.
public static readonly string Svg
Field Value
UrlencodedForm
Gets the mime-type for a form: application/x-www-form-urlencoded.
public static readonly string UrlencodedForm
Field Value
Xml
Gets the mime-type for XML text: text/xml.
public static readonly string Xml
Field Value
Methods
FromExtension(string)
Gets the mime type from a file extension ".ext".
public static string FromExtension(string extension)
Parameters
extension
stringThe extension (starting with a dot).
Returns
- string
The mime-type of the given extension.
GetExtension(string)
Gets some extension ".ext" from a MIME type.
public static string GetExtension(string mimeType)
Parameters
mimeType
stringThe mime-type of the given extension.
Returns
- string
An extension (starting with a dot) or an empty string.
IsJavaScript(string)
Checks if the given mime-type is one of the JavaScript variants.
public static bool IsJavaScript(string type)
Parameters
type
stringThe type to check for.
Returns
- bool
True if it is a legal JavaScript mime-type, otherwise false.
Represents(MimeType, string)
Checks if the given mime-type is equivalent to the provided string representation.
public static bool Represents(this MimeType type, string content)
Parameters
Returns
- bool
True if both (type and representation) are equivalent, else false.