Share via


FileExtensionContentTypeProvider Class

 

Provides a mapping between file extensions and MIME types.

Namespace:   Microsoft.Owin.StaticFiles.ContentTypes
Assembly:  Microsoft.Owin.StaticFiles (in Microsoft.Owin.StaticFiles.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.StaticFiles.ContentTypes.FileExtensionContentTypeProvider

Syntax

public class FileExtensionContentTypeProvider : IContentTypeProvider
public ref class FileExtensionContentTypeProvider : IContentTypeProvider
type FileExtensionContentTypeProvider = 
    class
        interface IContentTypeProvider
    end
Public Class FileExtensionContentTypeProvider
    Implements IContentTypeProvider

Constructors

Name Description
System_CAPS_pubmethod FileExtensionContentTypeProvider()

Creates a new provider with a set of default mappings.

System_CAPS_pubmethod FileExtensionContentTypeProvider(IDictionary<String, String>)

Creates a lookup engine using the provided mapping. It is recommended that the IDictionary instance use StringComparer.OrdinalIgnoreCase.

Properties

Name Description
System_CAPS_pubproperty Mappings

The cross reference table of file extensions and content-types.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TryGetContentType(String, String)

Given a file path, determine the MIME type

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.StaticFiles.ContentTypes Namespace

Return to top