ManagedCode.MimeTypes
1.0.2
Prefix Reserved
dotnet add package ManagedCode.MimeTypes --version 1.0.2
NuGet\Install-Package ManagedCode.MimeTypes -Version 1.0.2
<PackageReference Include="ManagedCode.MimeTypes" Version="1.0.2" />
paket add ManagedCode.MimeTypes --version 1.0.2
#r "nuget: ManagedCode.MimeTypes, 1.0.2"
// Install ManagedCode.MimeTypes as a Cake Addin #addin nuget:?package=ManagedCode.MimeTypes&version=1.0.2 // Install ManagedCode.MimeTypes as a Cake Tool #tool nuget:?package=ManagedCode.MimeTypes&version=1.0.2
MimeTypes
Version | Package | Description |
---|---|---|
ManagedCode.MimeTypes | Core |
Motivation
MIME (Multipurpose Internet Mail Extensions) types are used to specify the type of data that a file contains, such as text, images, or video. These types are often used in web development to indicate the type of content in HTTP responses.
Working with MIME types in C# can be cumbersome, as they are typically represented as strings. This can make it difficult to ensure the correct usage and spelling of MIME types, and can lead to errors and inconsistencies in your code.
Our project, MimeType, provides a convenient way to work with MIME types in C#. It defines a set of properties for each MIME type, allowing you to use properties instead of strings in your code. This makes it easy to ensure the correct usage and spelling of MIME types, and can make your code more readable and maintainable.
Features
Defines a set of properties for each MIME type, allowing you to use properties instead of strings in your code. Makes it easy to ensure the correct usage and spelling of MIME types. Improves the readability and maintainability of your code.
Example
Here's an example of how you might use the MimeType project to specify the content type of an HTTP response in C#:
using ManagedCode.MimeTypes;
// Set the content type of the response to "text/plain".
response.ContentType = MimeType.TextPlain;
Installation
To install the MimeType project, you can use NuGet:
dotnet add package ManagedCode.MimeTypes
Usage
To use the MimeType project, you will need to add a reference to the MimeType namespace in your C# code:
using MimeType;
Then, you can use the properties defined by the MimeType class to specify MIME types in your code. For example:
// Set the content type of the response to "application/pdf".
response.ContentType = MimeHelper.PDF;
// Set the content type of the response to ""text/plain"".
response.ContentType = MimeHelper.GetMimeType("file.txt");
Conclusion
In summary, the MimeType project provides a convenient and easy-to-use way to work with MIME types in C#. Its properties make it easy to ensure the correct usage and spelling of MIME types, and can improve the readability and maintainability of your code. We hope you find it useful in your own projects!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on ManagedCode.MimeTypes:
Package | Downloads |
---|---|
ManagedCode.Storage.Core
Base interfaces for ManagedCode.StorageS |
|
ManagedCode.Storage.AspNetExtensions
Extensions for ASP.NET for Storage |
|
ManagedCode.Storage.FileSystem
Storage for FileSystem |
|
ManagedCode.Storage.Server
Extensions for ASP.NET for Storage |
|
ManagedCode.Storage.Client
Extensions for ASP.NET for Storage |
GitHub repositories
This package is not used by any popular GitHub repositories.