Delen via


IUserLockoutStore<TUser>.SetLockoutEndDateAsync Method

Definition

Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user.

public:
 System::Threading::Tasks::Task ^ SetLockoutEndDateAsync(TUser user, Nullable<DateTimeOffset> lockoutEnd, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task SetLockoutEndDateAsync (TUser user, DateTimeOffset? lockoutEnd, System.Threading.CancellationToken cancellationToken);
abstract member SetLockoutEndDateAsync : 'User * Nullable<DateTimeOffset> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SetLockoutEndDateAsync (user As TUser, lockoutEnd As Nullable(Of DateTimeOffset), cancellationToken As CancellationToken) As Task

Parameters

user
TUser

The user whose lockout date should be set.

lockoutEnd
Nullable<DateTimeOffset>

The DateTimeOffset after which the user's lockout should end.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

The Task that represents the asynchronous operation.

Applies to