Share via


ODataUriFunctions.AddCustomUriFunction Method

Definition

This is a shortcut of adding the custom FunctionSignature through 'CustomUriFunctions' class and binding the function name to it's MethodInfo through 'UriFunctionsBinder' class. See these classes documentations. In case of an exception, both operations(adding the signature and binding the function) will be undone.

public static void AddCustomUriFunction (string functionName, Microsoft.OData.UriParser.FunctionSignatureWithReturnType functionSignature, System.Reflection.MethodInfo methodInfo);
static member AddCustomUriFunction : string * Microsoft.OData.UriParser.FunctionSignatureWithReturnType * System.Reflection.MethodInfo -> unit
Public Shared Sub AddCustomUriFunction (functionName As String, functionSignature As FunctionSignatureWithReturnType, methodInfo As MethodInfo)

Parameters

functionName
String

The uri function name that appears in the OData request uri.

functionSignature
FunctionSignatureWithReturnType

The new custom function signature.

methodInfo
MethodInfo

The MethodInfo to bind the given function name.

Exceptions

Any exception thrown by 'CustomUriFunctions.AddCustomUriFunction' and 'UriFunctionBinder.BindUriFunctionName' methods.

Applies to