Share via


CustomUriLiteralParsers.ParseUriStringToType Method

Definition

Parse the given uri text. Try to parse with a specific Uri literal parser registered for the target EdmType. If no parser is registered, try to parse with the general parsers. This method is public because of the Interface, but the Singleton instance in internal so it could not be accessed by clients.

public object ParseUriStringToType (string text, Microsoft.OData.Edm.IEdmTypeReference targetType, out Microsoft.OData.UriParser.UriLiteralParsingException parsingException);
abstract member ParseUriStringToType : string * Microsoft.OData.Edm.IEdmTypeReference * UriLiteralParsingException -> obj
override this.ParseUriStringToType : string * Microsoft.OData.Edm.IEdmTypeReference * UriLiteralParsingException -> obj
Public Function ParseUriStringToType (text As String, targetType As IEdmTypeReference, ByRef parsingException As UriLiteralParsingException) As Object

Parameters

text
String

Part of the Uri which has to be parsed to a value of EdmType targetType

targetType
IEdmTypeReference

The type which the uri text has to be parsed to

parsingException
UriLiteralParsingException

Assign the exception only in case the text could be parsed to the targetType but failed during the parsing process

Returns

If parsing process has succeeded, returns the parsed object, otherwise returns 'Null'

Implements

Applies to