Was this page helpful?

MimeType Class

    Table of contents
    1. 1. Members
      1. 1.1. Constructors
      2. 1.2. Fields
      3. 1.3. Properties
      4. 1.4. Methods
    Table of Contents
    public class MimeType
    Namespace: MindTouch.Dream
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • MimeType
    Encapsulates a content mime type.

    Members

    Constructors

    Visibility Description
    Public MimeType(string contentTypeWithParameters) Create a new mime-type from an exact-match content-type string.
    Public MimeType(string contentTypeWithParameters, Encoding charset, float quality) Create a new mime-type from an exact-match content-type string.
    Public MimeType(string contentTypeWithParameters, float quality) Create a new mime-type from an exact-match content-type string.
    Public MimeType(string contentTypeWithParameters, Encoding charset) Create a new mime-type from an exact-match content-type string.

    Fields

    Visibility Description
    Public ANY Creates a MindTouch.Dream.MimeType instance that can match any mime type.
    Public ANY_TEXT Creates a MindTouch.Dream.MimeType instance that can match any text mime type.
    Public ATOM Creates a MindTouch.Dream.MimeType instance for Atom content.
    Public BINARY Creates a MindTouch.Dream.MimeType instance for binary content.
    Public BMP Creates a MindTouch.Dream.MimeType instance for BMP Images.
    Public CSS Creates a MindTouch.Dream.MimeType instance for CSS.
    Public DREAM_EXCEPTION Creates a MindTouch.Dream.MimeType instance for dream exception xml.
    Public FORM_URLENCODED Creates a MindTouch.Dream.MimeType instance for wwww form urlencoded content.
    Public GIF Creates a MindTouch.Dream.MimeType instance for GIF images.
    Public HTML Creates a MindTouch.Dream.MimeType instance for Html content.
    Public HTTP Creates a MindTouch.Dream.MimeType instance for Http Applications.
    Public JPEG Creates a MindTouch.Dream.MimeType instance for JPEG images.
    Public JS Creates a MindTouch.Dream.MimeType instance for javascript source code.
    Public JSON Creates a MindTouch.Dream.MimeType instance for javascript object notation content.
    Public MULTIPART_MIXED Creates a MindTouch.Dream.MimeType instance for multipart/mixed content.
    Public NOTHING Creates a MindTouch.Dream.MimeType instance indidcating no content.
    Public PDF Creates a MindTouch.Dream.MimeType instance for Adobe PDF.
    Public PHP Creates a MindTouch.Dream.MimeType instance for PHP source code.
    Public PNG Creates a MindTouch.Dream.MimeType instance for PNG images.
    Public RDF Creates a MindTouch.Dream.MimeType instance for RDF content.
    Public RELAXNG Creates a MindTouch.Dream.MimeType instance for Relax-NG schema content.
    Public SVG Creates a MindTouch.Dream.MimeType instance for SVG images.
    Public TEXT Creates a MindTouch.Dream.MimeType instance for plain text content.
    Public TEXT_UTF8 Creates a MindTouch.Dream.MimeType instance for UTF-8 encoded text content.
    Public TEXT_XML Creates a MindTouch.Dream.MimeType instance for ASCII-encoded Xml content.
    Public TIFF Creates a MindTouch.Dream.MimeType instance for TIFF images.
    Public VCAL Creates a MindTouch.Dream.MimeType instance for VCal calendar files.
    Public VERSIT Creates a MindTouch.Dream.MimeType instance for VCard files.
    Public XHTML Creates a MindTouch.Dream.MimeType instance for XHtml content.
    Public XML Creates a MindTouch.Dream.MimeType instance for Xml content.
    Public XRDS Creates a MindTouch.Dream.MimeType instance for Xrds content.

    Properties

    Visibility Description
    Public MainType Main type.
    Public SubType Sub type.
    Public FullType Full type (without parameters).
    Public Parameters Type parameters.
    Public Quality Match quality value.
    Public CharSet Type Encoding.
    Public IsXml True if content represented by the mime-type is Xml.

    Methods

    Visibility Description
    Public New(string contentTypeWithParameters) Create a new Mimetype instance with a manually specified content-type.
    Public MatchBestContentType(MimeType[] have, MimeType[] accept) Get the best matching Mimetype given a list of mime-type options and accepted mime-types.
    Public ParseAcceptHeader(string accept) Parse an array of accepted mime-types from an DreamHeaders.Accept header.
    Public RenderAcceptHeader(params MimeType[] types) Render an DreamHeaders.Accept header value from an array of mime-types.
    Public FromFileExtension(string filename) Derive a mime-type from a file extension.
    Public TryParse(string contentTypeWithParameters, out MimeType result) Try to parse a mime-type from a content-type string.
    Protected TryParse(string contentTypeWithParameters, out string type, out string subtype, out Dictionary<string,string> parameters) Try to parse a mime-type components from a content-type string.
    Public Match(MimeType other) Try to match instance against another instance.
    Public GetParameter(string name) Get a named parameter.
    Public ToString() (Override) Render mime-type as a string representation including parameters.
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by