Click or drag to resize
MimeKit

ContentType Class

A class representing a Content-Type header value.
Inheritance Hierarchy
SystemObject
  MimeKitContentType

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public class ContentType

The ContentType type exposes the following members.

Constructors
 NameDescription
Public methodContentType Initialize a new instance of the ContentType class.
Top
Properties
 NameDescription
Public propertyBoundary Get or set the boundary parameter.
Public propertyCharset Get or set the charset parameter.
Public propertyCharsetEncoding Get or set the charset parameter as an Encoding.
Public propertyFormat Get or set the format parameter.
Public propertyMediaSubtype Get or set the media subtype.
Public propertyMediaType Get or set the type of the media.
Public propertyMimeType Get the simple mime-type.
Public propertyName Get or set the name parameter.
Public propertyParameters Get the list of parameters on the ContentType.
Top
Methods
 NameDescription
Public methodClone Clone the content type.
Public methodEquals
(Inherited from Object)
Protected methodFinalize
(Inherited from Object)
Public methodGetHashCode
(Inherited from Object)
Public methodGetType
(Inherited from Object)
Public methodIsMimeType Check if the this instance of ContentType matches the specified MIME media type and subtype.
Protected methodMemberwiseClone
(Inherited from Object)
Public methodStatic memberParse(Byte) Parse the specified input buffer into a new instance of the ContentType class.
Public methodStatic memberParse(String) Parse the specified text into a new instance of the ContentType class.
Public methodStatic memberParse(Byte, Int32) Parse the specified input buffer into a new instance of the ContentType class.
Public methodStatic memberParse(ParserOptions, Byte) Parse the specified input buffer into a new instance of the ContentType class.
Public methodStatic memberParse(ParserOptions, String) Parse the specified text into a new instance of the ContentType class.
Public methodStatic memberParse(Byte, Int32, Int32) Parse the specified input buffer into a new instance of the ContentType class.
Public methodStatic memberParse(ParserOptions, Byte, Int32) Parse the specified input buffer into a new instance of the ContentType class.
Public methodStatic memberParse(ParserOptions, Byte, Int32, Int32) Parse the specified input buffer into a new instance of the ContentType class.
Public methodToString Serialize the ContentType to a string.
(Overrides ObjectToString)
Public methodToString(Boolean) Serialize the ContentType to a string, optionally encoding the parameters.
Public methodToString(Encoding, Boolean) Serialize the ContentType to a string, optionally encoding the parameters.
Public methodToString(FormatOptions, Encoding, Boolean) Serialize the ContentType to a string, optionally encoding the parameters.
Public methodStatic memberTryParse(Byte, ContentType) Try to parse the given input buffer into a new ContentType instance.
Public methodStatic memberTryParse(String, ContentType) Try to parse the given text into a new ContentType instance.
Public methodStatic memberTryParse(Byte, Int32, ContentType) Try to parse the given input buffer into a new ContentType instance.
Public methodStatic memberTryParse(ParserOptions, Byte, ContentType) Try to parse the given input buffer into a new ContentType instance.
Public methodStatic memberTryParse(ParserOptions, String, ContentType) Try to parse the given text into a new ContentType instance.
Public methodStatic memberTryParse(Byte, Int32, Int32, ContentType) Try to parse the given input buffer into a new ContentType instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, ContentType) Try to parse the given input buffer into a new ContentType instance.
Public methodStatic memberTryParse(ParserOptions, Byte, Int32, Int32, ContentType) Try to parse the given input buffer into a new ContentType instance.
Top
Remarks
The Content-Type header is a way for the originating client to suggest to the receiving client the mime-type of the content and, depending on that mime-type, presentation options such as charset.
See Also