ODataCollectionSerializer.CreateODataCollectionValue Method (IEnumerable, IEdmTypeReference, ODataSerializerContext)
Creates an ODataCollectionValue for the enumerable represented by enumerable.
Namespace: System.Web.Http.OData.Formatter.Serialization
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
public virtual ODataCollectionValue CreateODataCollectionValue(
IEnumerable enumerable,
IEdmTypeReference elementType,
ODataSerializerContext writeContext
)
public:
virtual ODataCollectionValue^ CreateODataCollectionValue(
IEnumerable^ enumerable,
IEdmTypeReference^ elementType,
ODataSerializerContext^ writeContext
)
abstract CreateODataCollectionValue :
enumerable:IEnumerable *
elementType:IEdmTypeReference *
writeContext:ODataSerializerContext -> ODataCollectionValue
override CreateODataCollectionValue :
enumerable:IEnumerable *
elementType:IEdmTypeReference *
writeContext:ODataSerializerContext -> ODataCollectionValue
Public Overridable Function CreateODataCollectionValue (
enumerable As IEnumerable,
elementType As IEdmTypeReference,
writeContext As ODataSerializerContext
) As ODataCollectionValue
Parameters
enumerable
Type: System.Collections.IEnumerableThe value of the collection to be created.
elementType
Type: Microsoft.Data.Edm.IEdmTypeReferenceThe element EDM type of the collection.
writeContext
Type: System.Web.Http.OData.Formatter.Serialization.ODataSerializerContextThe serializer context to be used while creating the collection.
Return Value
Type: Microsoft.Data.OData.ODataCollectionValue
The created ODataCollectionValue.
See Also
ODataCollectionSerializer Class
System.Web.Http.OData.Formatter.Serialization Namespace
Return to top