Method Register
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Register(Func<NavigationAttempt, bool>, RouteBlockerState)
Disposing stops future predicate checks. An already Blocked state remains answerable until its attempt settles.
public IDisposable Register(Func<NavigationAttempt, bool> shouldBlock, RouteBlockerState state)
Parameters
shouldBlockFunc<NavigationAttempt, bool>stateRouteBlockerState
Returns
- IDisposable
Register(Func<NavigationAttempt, CancellationToken, VelvetTask<bool>>, RouteBlockerState)
Disposing stops future predicate checks. An already Blocked state remains answerable until its attempt settles.
public IDisposable Register(Func<NavigationAttempt, CancellationToken, VelvetTask<bool>> shouldBlock, RouteBlockerState state)
Parameters
shouldBlockFunc<NavigationAttempt, CancellationToken, VelvetTask<bool>>stateRouteBlockerState
Returns
- IDisposable