Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend MediaTypeNames #103575

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libraries/System.Net.Mail/ref/System.Net.Mail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ public static partial class MediaTypeNames
public static partial class Application
{
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
public const string GZip = "application/gzip";
public const string Json = "application/json";
public const string JsonPatch = "application/json-patch+json";
public const string JsonSequence = "application/json-seq";
Expand Down Expand Up @@ -366,11 +367,14 @@ public static partial class Multipart
{
public const string ByteRanges = "multipart/byteranges";
public const string FormData = "multipart/form-data";
public const string Mixed = "multipart/mixed";
public const string Related = "multipart/related";
}
public static partial class Text
{
public const string Css = "text/css";
public const string Csv = "text/csv";
public const string EventStream = "text/event-stream";
public const string Html = "text/html";
public const string JavaScript = "text/javascript";
public const string Markdown = "text/markdown";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public static class Application
/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data consists of url-encoded key-value pairs.</summary>
public const string FormUrlEncoded = "application/x-www-form-urlencoded";

/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in gzip format.</summary>
public const string GZip = "application/gzip";

/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON format.</summary>
public const string Json = "application/json";

Expand Down Expand Up @@ -118,6 +121,12 @@ public static class Multipart

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in form data format.</summary>
public const string FormData = "multipart/form-data";

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in mixed format.</summary>
public const string Mixed = "multipart/mixed";

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in related format.</summary>
public const string Related = "multipart/related";
}

/// <summary>Specifies the kind of text data in an email message attachment.</summary>
Expand All @@ -129,6 +138,9 @@ public static class Text
/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in CSV format.</summary>
public const string Csv = "text/csv";

/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in event stream format.</summary>
public const string EventStream = "text/event-stream";

/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in HTML format.</summary>
public const string Html = "text/html";

Expand Down
Loading