MediaType Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MediaType(StringSegment) |
Initializes a MediaType instance. |
MediaType(String) |
Initializes a MediaType instance. |
MediaType(String, Int32, Nullable<Int32>) |
Initializes a Microsoft.AspNetCore.Mvc.Formatters.MediaType.MediaTypeParameterParser instance. |
MediaType(StringSegment)
- Source:
- MediaType.cs
- Source:
- MediaType.cs
- Source:
- MediaType.cs
Initializes a MediaType instance.
public:
MediaType(Microsoft::Extensions::Primitives::StringSegment mediaType);
public MediaType (Microsoft.Extensions.Primitives.StringSegment mediaType);
new Microsoft.AspNetCore.Mvc.Formatters.MediaType : Microsoft.Extensions.Primitives.StringSegment -> Microsoft.AspNetCore.Mvc.Formatters.MediaType
Public Sub New (mediaType As StringSegment)
Parameters
- mediaType
- StringSegment
The StringSegment with the media type.
Applies to
MediaType(String)
- Source:
- MediaType.cs
- Source:
- MediaType.cs
- Source:
- MediaType.cs
Initializes a MediaType instance.
public:
MediaType(System::String ^ mediaType);
public MediaType (string mediaType);
new Microsoft.AspNetCore.Mvc.Formatters.MediaType : string -> Microsoft.AspNetCore.Mvc.Formatters.MediaType
Public Sub New (mediaType As String)
Parameters
Applies to
MediaType(String, Int32, Nullable<Int32>)
- Source:
- MediaType.cs
- Source:
- MediaType.cs
- Source:
- MediaType.cs
Initializes a Microsoft.AspNetCore.Mvc.Formatters.MediaType.MediaTypeParameterParser instance.
public:
MediaType(System::String ^ mediaType, int offset, Nullable<int> length);
public MediaType (string mediaType, int offset, int? length);
new Microsoft.AspNetCore.Mvc.Formatters.MediaType : string * int * Nullable<int> -> Microsoft.AspNetCore.Mvc.Formatters.MediaType
Public Sub New (mediaType As String, offset As Integer, length As Nullable(Of Integer))
Parameters
- offset
- Int32
The offset in the mediaType
where the parsing starts.