Share via


ODataOutputContext.CreateODataResourceWriterAsync Method

Definition

Asynchronously creates an ODataWriter to write a resource.

public virtual System.Threading.Tasks.Task<Microsoft.OData.ODataWriter> CreateODataResourceWriterAsync (Microsoft.OData.Edm.IEdmNavigationSource navigationSource, Microsoft.OData.Edm.IEdmStructuredType resourceType);
abstract member CreateODataResourceWriterAsync : Microsoft.OData.Edm.IEdmNavigationSource * Microsoft.OData.Edm.IEdmStructuredType -> System.Threading.Tasks.Task<Microsoft.OData.ODataWriter>
override this.CreateODataResourceWriterAsync : Microsoft.OData.Edm.IEdmNavigationSource * Microsoft.OData.Edm.IEdmStructuredType -> System.Threading.Tasks.Task<Microsoft.OData.ODataWriter>
Public Overridable Function CreateODataResourceWriterAsync (navigationSource As IEdmNavigationSource, resourceType As IEdmStructuredType) As Task(Of ODataWriter)

Parameters

navigationSource
IEdmNavigationSource

The navigation source we are going to write resource set for.

resourceType
IEdmStructuredType

The structured type for the items in the resource set to be written (or null if the entity set base type should be used).

Returns

A running task for the created writer.

Remarks

The write must flush the output when it's finished (inside the last Write call).

Applies to