Table of Contents

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

shouldBlock Func<NavigationAttempt, bool>
state RouteBlockerState

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

shouldBlock Func<NavigationAttempt, CancellationToken, VelvetTask<bool>>
state RouteBlockerState

Returns

IDisposable