IRoleStore<TRole>.FindByIdAsync(String, CancellationToken) Method

Definition

Finds the role who has the specified ID as an asynchronous operation.

public:
 System::Threading::Tasks::Task<TRole> ^ FindByIdAsync(System::String ^ roleId, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TRole> FindByIdAsync (string roleId, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TRole?> FindByIdAsync (string roleId, System.Threading.CancellationToken cancellationToken);
abstract member FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role : null)>
Public Function FindByIdAsync (roleId As String, cancellationToken As CancellationToken) As Task(Of TRole)

Parameters

roleId
String

The role ID to look for.

cancellationToken
CancellationToken

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

Returns

Task<TRole>

A Task<TResult> that result of the look up.

Applies to