Share via


ODataSimplifiedOptions Class

Definition

Options which used to control the behaviour related odata simplified.

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

Constructors

ODataSimplifiedOptions()

Constructor of ODataSimplifiedOptions

ODataSimplifiedOptions(Nullable<ODataVersion>)

Constructor of ODataSimplifiedOptions

Properties

EnableParsingKeyAsSegmentUrl

True if url parser support parsing path with key as segment, otherwise false. The default is true.

EnableReadingKeyAsSegment

Gets or sets a value that indicates whether the reader should put key values in their own URI segment when automatically building URIs. If this value is false, automatically-generated URLs will take the form "../EntitySet('KeyValue')/..". If this value is true, automatically-generated URLs will take the form "../EntitySet/KeyValue/..". This setting only applies to URLs that are automatically generated by the ODataMessageReader and the URLs explicitly provided by the server won't be modified.

EnableReadingODataAnnotationWithoutPrefix

True if can read reserved annotation name without prefix 'odata.', otherwise false. The default value is false for OData 4.0 and true for OData 4.01. The option is applied during deserialization.

EnableWritingKeyAsSegment

Gets or sets a value that indicates whether the writer should put key values in their own URI segment when automatically building URIs. If this value is false, automatically-generated URLs will take the form "../EntitySet('KeyValue')/..". If this value is true, automatically-generated URLs will take the form "../EntitySet/KeyValue/..". This setting only applies to URLs that are automatically generated by the ODataMessageWriter and does not modify URLs explicitly provided by the user.

EnableWritingODataAnnotationWithoutPrefix
Obsolete.

True if control information should be written without the prefix 'odata.', otherwise false. The default value is false for OData 4.0, true for OData 4.01. The option is applied during serialization.

Methods

Clone()

Creates a shallow copy of this ODataSimplifiedOptions.

GetOmitODataPrefix()

Get whether to write OData control information without a prefix True if control information can be read without prefix 'odata.', otherwise false. The default value is false for OData 4.0 and true for OData 4.01. The option is applied during deserialization.

GetOmitODataPrefix(ODataVersion)

Version-specific behavior for writing OData control information without a prefix True if control information can be read without prefix 'odata.', otherwise false. The default value is false for OData 4.0 and true for OData 4.01. The option is applied during deserialization.

SetOmitODataPrefix(Boolean)

Whether to write OData control information without a prefix True to read control information without the prefix 'odata.', otherwise false. The default value is false for OData 4.0 and true for OData 4.01. The option is applied during deserialization.

SetOmitODataPrefix(Boolean, ODataVersion)

Version-specific behavior for writing OData control information without a prefix True to read control information without the prefix 'odata.', otherwise false. The default value is false for OData 4.0 and true for OData 4.01. The option is applied during deserialization.

Applies to