Interface IMimeTypeProvider
Represents an object that contains information on specific MIME types and media ranges.
Namespace: EmbedIO
Syntax
public interface IMimeTypeProvider
Methods
GetMimeType(String)
Gets the MIME type associated to a file extension.
Declaration
string GetMimeType(string extension)
Parameters
Type | Name | Description |
---|---|---|
String | extension | The file extension for which a corresponding MIME type is wanted. |
Returns
Type | Description |
---|---|
String | The MIME type corresponding to |
TryDetermineCompression(String, out Boolean)
Attempts to determine whether compression should be preferred when negotiating content encoding for a response with the specified content type.
Declaration
bool TryDetermineCompression(string mimeType, out bool preferCompression)
Parameters
Type | Name | Description |
---|---|---|
String | mimeType | The MIME type to check. |
Boolean | preferCompression | When this method returns true, a value indicating whether compression should be preferred. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
Boolean | true if a value is found for |