Definition
Assembly: Microsoft.Restier.AspNetCore.dll Namespace: Microsoft.Restier.AspNetCore.Formatter Inheritance: Microsoft.AspNet.OData.Formatter.Serialization.ODataPrimitiveSerializerSyntax
Summary
The serializer for primitive result.Constructors
.ctor
Initializes a new instance of the RestierPrimitiveSerializer class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
payloadValueConverter | Microsoft.OData.ODataPayloadValueConverter | The ODataPayloadValueConverter to use. |
Methods
CreateODataPrimitiveValue Override
Creates an ODataPrimitiveValue for the object represented by graph.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
graph | object | The primitive value. |
primitiveType | Microsoft.OData.Edm.IEdmPrimitiveTypeReference | The EDM primitive type of the value. |
writeContext | Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext | The serializer write context. |
Returns
Type:Microsoft.OData.ODataPrimitiveValue
The created ODataPrimitiveValue.
WriteObject Override
Writes the entity result to the response message.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
graph | object | The entity result to write. |
type | System.Type | The type of the entity. |
messageWriter | Microsoft.OData.ODataMessageWriter | The message writer. |
writeContext | Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext | The writing context. |
WriteObjectAsync Override
Writes the entity result to the response message asynchronously.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
graph | object | The entity result to write. |
type | System.Type | The type of the entity. |
messageWriter | Microsoft.OData.ODataMessageWriter | The message writer. |
writeContext | Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext | The writing context. |
Returns
Type:System.Threading.Tasks.Task
A task representing the asynchronous operation.