Table of Contents

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

string

ApplicationXHtml

Gets the mime-type for XHTML / XML text: application/xhtml+xml.

public static readonly string ApplicationXHtml

Field Value

string

ApplicationXml

Gets the mime-type for XML applications: application/xml.

public static readonly string ApplicationXml

Field Value

string

Binary

Gets the mime-type for raw binary data: application/octet-stream.

public static readonly string Binary

Field Value

string

Css

Gets the mime-type for a cascading style sheet: text/css.

public static readonly string Css

Field Value

string

DefaultJavaScript

Gets the default mime-type for JavaScript scripts: text/javascript.

public static readonly string DefaultJavaScript

Field Value

string

Html

Gets the mime-type for HTML text: text/html.

public static readonly string Html

Field Value

string

MultipartForm

Gets the mime-type for multipart form data: multipart/form-data.

public static readonly string MultipartForm

Field Value

string

Plain

Gets the mime-type for plain text: text/plain.

public static readonly string Plain

Field Value

string

Png

Gets the mime-type for a PNG image: image/png.

public static readonly string Png

Field Value

string

Svg

Gets the mime-type for SVG text: image/svg+xml.

public static readonly string Svg

Field Value

string

UrlencodedForm

Gets the mime-type for a form: application/x-www-form-urlencoded.

public static readonly string UrlencodedForm

Field Value

string

Xml

Gets the mime-type for XML text: text/xml.

public static readonly string Xml

Field Value

string

Methods

FromExtension(string)

Gets the mime type from a file extension ".ext".

public static string FromExtension(string extension)

Parameters

extension string

The 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 string

The 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 string

The 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

type MimeType

The type to check for.

content string

THe string representation.

Returns

bool

True if both (type and representation) are equivalent, else false.