Share via


OutputFormatterCanWriteContext.ContentType Property

Definition

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)

Applies to