Mirror of wagesj45/MimeTypeList.
Go to file
Jordan Wages a9d57ae593 Fixing various bugs in structure.
Fixing class structures so that everything works as expected.
2019-07-10 00:22:03 -05:00
MimeTypeList Fixing various bugs in structure. 2019-07-10 00:22:03 -05:00
.gitattributes Initial commit 2019-07-09 03:37:25 -05:00
.gitignore Initial commit 2019-07-09 03:37:25 -05:00
LICENSE Initial commit 2019-07-09 03:37:25 -05:00
README.md Update README.md 2019-07-10 00:18:23 -05:00

README.md

MimeTypeList

Provides a hard-coded collection of file extension and mime type mapping. This project was inspired by samuelneff/MimeTypeMap. This project uses the data from that project to create classes with members for each extension and mime type for lookups.

You can access the values with the FileExtensions and MimeTypes static classes:

FileExtensions._ruleset
MimeTypes.application.onenote

Installation

You can install MimeTypeList from Nuget.org.

Usage

After installation MimeTypeList, include the following using statement in your class:

using MimeTypeList;

Getting Extensions

Console.WriteLine(MimeTypes.application.onenote); // ".one"

Getting Mime Types

Console.WriteLine(FileExtensions._ruleset); // "application/xml"