7 writes to ContentType
Microsoft.AspNetCore.Mvc.Core (7)
Formatters\OutputFormatter.cs (2)
115
context.
ContentType
= new StringSegment(SupportedMediaTypes[0]);
146
context.
ContentType
= new StringSegment(SupportedMediaTypes[i]);
Formatters\TextOutputFormatter.cs (1)
145
context.
ContentType
= selectedMediaType;
Infrastructure\DefaultOutputFormatterSelector.cs (4)
176
formatterContext.
ContentType
= new StringSegment();
197
formatterContext.
ContentType
= mediaType.MediaType;
222
formatterContext.
ContentType
= new StringSegment(contentType);
252
formatterContext.
ContentType
= new StringSegment(possibleOutputContentTypes[j]);
11 references to ContentType
Microsoft.AspNetCore.Mvc.Core (11)
Formatters\OutputFormatter.cs (3)
111
if (!context.
ContentType
.HasValue)
120
var parsedContentType = new MediaType(context.
ContentType
);
174
response.ContentType = context.
ContentType
.Value ?? string.Empty;
Formatters\StreamOutputFormatter.cs (2)
35
if (context.
ContentType
!= null)
37
response.ContentType = context.
ContentType
.ToString();
Formatters\TextOutputFormatter.cs (3)
81
if (context.
ContentType
.HasValue)
83
var parsedContentType = new MediaType(context.
ContentType
);
107
var selectedMediaType = context.
ContentType
;
Infrastructure\DefaultOutputFormatterSelector.cs (1)
292
var contentType = Convert.ToString(context.
ContentType
, CultureInfo.InvariantCulture);
Infrastructure\ObjectResultExecutor.cs (2)
176
if (context.
ContentType
.HasValue)
178
considered.Add(Convert.ToString(context.
ContentType
, CultureInfo.InvariantCulture));