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
- baseFactory
Type: System.Func<EntityInstanceContext, Uri>
The action link factory that actually builds links if all checks pass.
- expensiveAvailabilityCheck
Type: System.Func<EntityInstanceContext, Boolean>
The availability check function that is expensive but when called returns whether the action is available.
Return Value
Type: System.Func<EntityInstanceContext, Uri>
The new action link factory.