Share via


ActionLinkBuilder.CreateActionLinkFactory Method

Creates an action link factory that builds an action link, but only when appropriate based on the expensiveAvailabilityCheck, and whether expensive checks should be made, which is deduced by looking at the EntityInstanceContext.SkipExpensiveActionAvailabilityChecks property.

Namespace:  System.Web.Http.OData.Builder
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
Public Shared Function CreateActionLinkFactory ( _
    baseFactory As Func(Of EntityInstanceContext, Uri), _
    expensiveAvailabilityCheck As Func(Of EntityInstanceContext, Boolean) _
) As Func(Of EntityInstanceContext, Uri)
'Usage
Dim baseFactory As Func(Of EntityInstanceContext, Uri)
Dim expensiveAvailabilityCheck As Func(Of EntityInstanceContext, Boolean)
Dim returnValue As Func(Of EntityInstanceContext, Uri)

returnValue = ActionLinkBuilder.CreateActionLinkFactory(baseFactory, _
    expensiveAvailabilityCheck)
public static Func<EntityInstanceContext, Uri> CreateActionLinkFactory(
    Func<EntityInstanceContext, Uri> baseFactory,
    Func<EntityInstanceContext, bool> expensiveAvailabilityCheck
)
public:
static Func<EntityInstanceContext^, Uri^>^ CreateActionLinkFactory(
    Func<EntityInstanceContext^, Uri^>^ baseFactory, 
    Func<EntityInstanceContext^, bool>^ expensiveAvailabilityCheck
)
static member CreateActionLinkFactory : 
        baseFactory:Func<EntityInstanceContext, Uri> * 
        expensiveAvailabilityCheck:Func<EntityInstanceContext, bool> -> Func<EntityInstanceContext, Uri> 
public static function CreateActionLinkFactory(
    baseFactory : Func<EntityInstanceContext, Uri>, 
    expensiveAvailabilityCheck : Func<EntityInstanceContext, boolean>
) : Func<EntityInstanceContext, Uri>

Parameters

Return Value

Type: System.Func<EntityInstanceContext, Uri>
The new action link factory.

See Also

Reference

ActionLinkBuilder Class

System.Web.Http.OData.Builder Namespace