Share via


CustomUriLiteralParsers Class

Definition

This class is the custom literal parser manager and parser. Add a Uri custom literal parser through this class. This class is also used as an UriLiteralParser.

public sealed class CustomUriLiteralParsers : Microsoft.OData.UriParser.IUriLiteralParser
type CustomUriLiteralParsers = class
    interface IUriLiteralParser
Public NotInheritable Class CustomUriLiteralParsers
Implements IUriLiteralParser
Inheritance
CustomUriLiteralParsers
Implements

Methods

AddCustomUriLiteralParser(IEdmTypeReference, IUriLiteralParser)

Add a custom 'IUriLiteralParser' which will be called to parse a value of the given EdmType during the UriParsing process.

AddCustomUriLiteralParser(IUriLiteralParser)

Add a custom 'IUriLiteralParser' which will be called to parse uri values during the uri parsing process.

ParseUriStringToType(String, IEdmTypeReference, UriLiteralParsingException)

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.

RemoveCustomUriLiteralParser(IUriLiteralParser)

Remove the given custom 'IUriLiteralParser' form cache. It will be removed from both regular parsers and parsers registered with EdmType.

Applies to