FromMime

DocumentFormatBase.FromMime<T> method

Retrieves an instance of the specified type T that has the specified MIME type.

public static T FromMime<T>(string mime)
    where T : DocumentFormatBase
Parameter Description
T The type of document format.
mime The MIME type of the document format.

Return Value

An instance of the specified type T with the specified MIME type.

Exceptions

exception condition
InvalidOperationException Thrown when no matching document format is found.

See Also