samuelneff / MimeTypeMap

Provides a huge dictionary of file extensions to mime types.
MIT License
625 stars 201 forks source link

Add TryGetMimeType & refactor GetMimeType #114

Closed HunteRoi closed 3 years ago

HunteRoi commented 3 years ago

Here you are, mate! @samuelneff

✨ Add TryGetMimeType 📝 Add XML documentation ♻️ Update GetMimeType to use TryGetMimeType 💥 Return null instead of string.Empty in GetExtension (this needs appropriate review)

Fixes #112 Fixes #113

samuelneff commented 3 years ago

Great PR, thank you! I changed one line to continue to return string.Empty instead of null . Changing this could be a breaking change and there are a lot of users. I wouldn't want to break anything on them.