ODataMessageExtensions.GetODataVersion Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetODataVersion(IODataRequestMessage, ODataVersion) |
Reads the OData-Version header from the |
GetODataVersion(IODataResponseMessage, ODataVersion) |
Reads the OData-Version header from the |
GetODataVersion(IODataRequestMessage, ODataVersion)
Reads the OData-Version header from the message
and parses it.
If no OData-Version header is found it sets the default version to be used for reading.
public static Microsoft.OData.ODataVersion GetODataVersion (this Microsoft.OData.IODataRequestMessage message, Microsoft.OData.ODataVersion defaultVersion);
static member GetODataVersion : Microsoft.OData.IODataRequestMessage * Microsoft.OData.ODataVersion -> Microsoft.OData.ODataVersion
<Extension()>
Public Function GetODataVersion (message As IODataRequestMessage, defaultVersion As ODataVersion) As ODataVersion
Parameters
- message
- IODataRequestMessage
The message to get the OData-Version version header from.
- defaultVersion
- ODataVersion
The default version to use if the header was not specified.
Returns
The ODataVersion retrieved from the OData-Version header of the message. The default version if none is specified in the header.
Applies to
GetODataVersion(IODataResponseMessage, ODataVersion)
Reads the OData-Version header from the message
and parses it.
If no OData-Version header is found it sets the default version to be used for reading.
public static Microsoft.OData.ODataVersion GetODataVersion (this Microsoft.OData.IODataResponseMessage message, Microsoft.OData.ODataVersion defaultVersion);
static member GetODataVersion : Microsoft.OData.IODataResponseMessage * Microsoft.OData.ODataVersion -> Microsoft.OData.ODataVersion
<Extension()>
Public Function GetODataVersion (message As IODataResponseMessage, defaultVersion As ODataVersion) As ODataVersion
Parameters
- message
- IODataResponseMessage
The message to get the OData-Version header from.
- defaultVersion
- ODataVersion
The default version to use if the header was not specified.
Returns
The ODataVersion retrieved from the OData-Version header of the message. The default version if none is specified in the header.