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: 2.14.0
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
Gets 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 methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsMimeType
Check if the this instance of ContentType matches the specified MIME media type and subtype.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(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(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