Share via


ODataMessageWriterSettings Class

Definition

Configuration settings for OData message writers.

public sealed class ODataMessageWriterSettings
type ODataMessageWriterSettings = class
Public NotInheritable Class ODataMessageWriterSettings
Inheritance
ODataMessageWriterSettings

Constructors

ODataMessageWriterSettings()

Initializes a new instance of the ODataMessageWriterSettings class with default settings.

Properties

AlwaysAddTypeAnnotationsForDerivedTypes

When set, type annotations will be added for derived types, even when the metadata level is set to "None".

ArrayPool

Get/sets the character buffer pool.

BaseUri

Gets or sets the document base URI which is used as base for all relative URIs.

EnableCharactersCheck

Flag to control whether the writer should check for valid Xml characters or not.

EnableMessageStreamDisposal

Gets or sets a value that indicates whether the message stream will be disposed after finishing writing with the message.

JsonPCallback

Gets or sets a callback function use to wrap the response from server.

LibraryCompatibility

Gets or sets library compatibility version. Default value is Latest,

MessageQuotas

Quotas to use for limiting resource consumption when writing an OData message.

MetadataSelector

Informs the metadata builder which properties, functions, actions, links to omit.

MultipartNewLine

Gets or sets the new line character sequence used when writing multipart messages see https://tools.ietf.org/html/rfc2046#section-5.1.1 A TextWriter uses OS specific newline but rfc2046 requires it to be CRLF.

ODataUri

The OData Uri of an incoming request. Call ODataUriParser's methods, and assign properties (e.g., ODataPath) to ODataUri.

Validations

Gets or sets validations to perform. Default value is All,

Version

Gets or sets the OData protocol version to be used for writing payloads.

Methods

Clone()

Creates a shallow copy of this ODataMessageWriterSettings.

SetContentType(ODataFormat)

Sets the format to be used when writing the payload. This will automatically set a compatible content type header.

SetContentType(String, String)

Sets the acceptable media types and character sets from which the content type will be computed when writing the payload.

Applies to