Skip to main content

Definition

Assembly: Microsoft.Restier.AspNetCore.dll Namespace: Microsoft.Restier.AspNetCore.Formatter Inheritance: Microsoft.AspNet.OData.Formatter.Serialization.ODataRawValueSerializer

Syntax

Microsoft.Restier.AspNetCore.Formatter.RestierRawSerializer

Summary

The serializer for raw result.

Constructors

.ctor

Initializes a new instance of the RestierRawSerializer class.

Syntax

public RestierRawSerializer(Microsoft.OData.ODataPayloadValueConverter payloadValueConverter)

Parameters

NameTypeDescription
payloadValueConverterMicrosoft.OData.ODataPayloadValueConverterThe ODataPayloadValueConverter to use.

Methods

WriteObject Override

Writes the entity result to the response message.

Syntax

public override void WriteObject(object graph, System.Type type, Microsoft.OData.ODataMessageWriter messageWriter, Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext writeContext)

Parameters

NameTypeDescription
graphobjectThe entity result to write.
typeSystem.TypeThe type of the entity.
messageWriterMicrosoft.OData.ODataMessageWriterThe message writer.
writeContextMicrosoft.AspNet.OData.Formatter.Serialization.ODataSerializerContextThe writing context.

WriteObjectAsync Override

Writes the entity result to the response message asynchronously.

Syntax

public override System.Threading.Tasks.Task WriteObjectAsync(object graph, System.Type type, Microsoft.OData.ODataMessageWriter messageWriter, Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext writeContext)

Parameters

NameTypeDescription
graphobjectThe entity result to write.
typeSystem.TypeThe type of the entity.
messageWriterMicrosoft.OData.ODataMessageWriterThe message writer.
writeContextMicrosoft.AspNet.OData.Formatter.Serialization.ODataSerializerContextThe writing context.

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous operation.