Definition
Assembly: Microsoft.Restier.AspNetCore.dll Namespace: Microsoft.Restier.AspNetCore.Formatter Inheritance: Microsoft.AspNet.OData.Formatter.Serialization.ODataEnumSerializerSyntax
Summary
The serializer for enum result.Constructors
.ctor
Initializes a new instance of the RestierEnumSerializer class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
provider | Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerProvider | The serializer provider. |
Methods
WriteObject Override
Writes the enum result to the response message.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
graph | object | The enum result to write. |
type | System.Type | The type of the enum. |
messageWriter | Microsoft.OData.ODataMessageWriter | The message writer. |
writeContext | Microsoft.AspNet.OData.Formatter.Serialization.ODataSerializerContext | The writing context. |
WriteObjectAsync Override
Writes the enum result to the response message.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
graph | object | The enum result to write. |
type | System.Type | The type of the enum. |
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.