ActionLinkBuilder.CreateActionLinkFactory Method (Func<EntityInstanceContext, Uri>, Func<EntityInstanceContext, Boolean>)
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
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 Shared Function CreateActionLinkFactory (
baseFactory As Func(Of EntityInstanceContext, Uri),
expensiveAvailabilityCheck As Func(Of EntityInstanceContext, Boolean)
) As Func(Of 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.
See Also
ActionLinkBuilder Class
System.Web.Http.OData.Builder Namespace
Return to top