ODataPrimitiveSerializer.CreateODataPrimitiveValue Method
Creates an ODataPrimitiveValue for the object represented by graph.
Namespace: System.Web.Http.OData.Formatter.Serialization
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Overridable Function CreateODataPrimitiveValue ( _
graph As Object, _
primitiveType As IEdmPrimitiveTypeReference, _
writeContext As ODataSerializerContext _
) As ODataPrimitiveValue
'Usage
Dim instance As ODataPrimitiveSerializer
Dim graph As Object
Dim primitiveType As IEdmPrimitiveTypeReference
Dim writeContext As ODataSerializerContext
Dim returnValue As ODataPrimitiveValue
returnValue = instance.CreateODataPrimitiveValue(graph, _
primitiveType, writeContext)
public virtual ODataPrimitiveValue CreateODataPrimitiveValue(
Object graph,
IEdmPrimitiveTypeReference primitiveType,
ODataSerializerContext writeContext
)
public:
virtual ODataPrimitiveValue^ CreateODataPrimitiveValue(
Object^ graph,
IEdmPrimitiveTypeReference^ primitiveType,
ODataSerializerContext^ writeContext
)
abstract CreateODataPrimitiveValue :
graph:Object *
primitiveType:IEdmPrimitiveTypeReference *
writeContext:ODataSerializerContext -> ODataPrimitiveValue
override CreateODataPrimitiveValue :
graph:Object *
primitiveType:IEdmPrimitiveTypeReference *
writeContext:ODataSerializerContext -> ODataPrimitiveValue
public function CreateODataPrimitiveValue(
graph : Object,
primitiveType : IEdmPrimitiveTypeReference,
writeContext : ODataSerializerContext
) : ODataPrimitiveValue
Parameters
- graph
Type: System.Object
The primitive value.
- primitiveType
Type: IEdmPrimitiveTypeReference
The EDM primitive type of the value.
- writeContext
Type: System.Web.Http.OData.Formatter.Serialization.ODataSerializerContext
The serializer write context.
Return Value
Type: ODataPrimitiveValue
The created ODataPrimitiveValue.