C# Class DineroPortableClientSDK.MimeTypeMap

Gets the mime type from a file name. Thanks goes to https://github.com/samuelneff/MimeTypeMap
Datei anzeigen Open project: DineroRegnskab/dinero-csharp-sdk

Public Methods

Method Description
GetMimeType ( string extension ) : string

Given an extension e.g. .jpg returns the MIME type i.e. image/jpeg

GetMimeTypeSubType ( string extension ) : string

Returns the sub type of an MIME type given an extension. E.g. with the extension .jpg the sub type part of the MIME type is jpeg.

GetMimeTypeType ( string extension ) : string

Returns the type part of the MIME type given an extension. E.g. with the extension .jpg the type part of the MIME type is image.

Method Details

GetMimeType() public static method

Given an extension e.g. .jpg returns the MIME type i.e. image/jpeg
public static GetMimeType ( string extension ) : string
extension string Extension of the file.
return string

GetMimeTypeSubType() public static method

Returns the sub type of an MIME type given an extension. E.g. with the extension .jpg the sub type part of the MIME type is jpeg.
public static GetMimeTypeSubType ( string extension ) : string
extension string
return string

GetMimeTypeType() public static method

Returns the type part of the MIME type given an extension. E.g. with the extension .jpg the type part of the MIME type is image.
public static GetMimeTypeType ( string extension ) : string
extension string
return string