OutputFormatterCanWriteContext.ContentType Property
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.
Gets or sets the content type to write to the response.
public:
virtual property Microsoft::Extensions::Primitives::StringSegment ContentType { Microsoft::Extensions::Primitives::StringSegment get(); void set(Microsoft::Extensions::Primitives::StringSegment value); };
public virtual Microsoft.Extensions.Primitives.StringSegment ContentType { get; set; }
member this.ContentType : Microsoft.Extensions.Primitives.StringSegment with get, set
Public Overridable Property ContentType As StringSegment
Property Value
Remarks
An IOutputFormatter can set this value when its CanWriteResult(OutputFormatterCanWriteContext) method is called, and expect to see the same value provided in WriteAsync(OutputFormatterWriteContext)