mirror of
				https://github.com/wagesj45/MimeTypeList.git
				synced 2025-09-09 03:10:39 -05:00 
			
		
		
		
	Update README.md
This commit is contained in:
		
					parent
					
						
							
								9eb0742765
							
						
					
				
			
			
				commit
				
					
						6098ba2a3d
					
				
			
		
					 1 changed files with 32 additions and 0 deletions
				
			
		
							
								
								
									
										32
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										32
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1 +1,33 @@
 | 
			
		|||
# MimeTypeList
 | 
			
		||||
Provides a hard-coded collection of file extension and mime type mapping. This project was inspired by [samuelneff/MimeTypeMap](https://github.com/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:
 | 
			
		||||
 | 
			
		||||
```c#
 | 
			
		||||
FileExtensions._ruleset
 | 
			
		||||
MimeTypes.application.onenote
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Installation 
 | 
			
		||||
 | 
			
		||||
You can install MimeTypeList from [Nuget.org](https://www.nuget.org/).
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
After installation MimeTypeList, include the following using statement in your class:
 | 
			
		||||
 | 
			
		||||
```cs
 | 
			
		||||
using MimeTypeList;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Getting Extensions
 | 
			
		||||
 | 
			
		||||
```cs
 | 
			
		||||
Console.WriteLine(MimeTypes.application.onenote); // ".one"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Getting Mime Types
 | 
			
		||||
 | 
			
		||||
```cs
 | 
			
		||||
Console.WriteLine(FileExtensions._ruleset); // "application/xml"
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue