Share via


CustomUriLiteralPrefixes.AddCustomLiteralPrefix Method

Definition

Add a literal prefix for the given EdmType.

public static void AddCustomLiteralPrefix (string literalPrefix, Microsoft.OData.Edm.IEdmTypeReference literalEdmTypeReference);
static member AddCustomLiteralPrefix : string * Microsoft.OData.Edm.IEdmTypeReference -> unit
Public Shared Sub AddCustomLiteralPrefix (literalPrefix As String, literalEdmTypeReference As IEdmTypeReference)

Parameters

literalPrefix
String

The custom name of the literal prefix

literalEdmTypeReference
IEdmTypeReference

The edm type of the custom literal

Exceptions

Arguments are null or empty

The given literal prefix is not valid

The given literal prefix already exists

Examples

filter=MyProperty eq MyCustomLiteral'VALUE'. "MyCustomLiteral" is the literal prefix and the literalEdmTypeReference is the type of the "VALUE".

Applies to