IUserPhoneNumberStore<TUser> Interface¶
Provides an abstraction for a store containing users’ telephone numbers.
- Namespace
Microsoft.AspNetCore.Identity
- Assemblies
- Microsoft.AspNetCore.Identity
Syntax¶
public interface IUserPhoneNumberStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class
-
interface
Microsoft.AspNetCore.Identity.
IUserPhoneNumberStore<TUser>
¶
Methods¶
-
GetPhoneNumberAsync
(TUser, System.Threading.CancellationToken)¶ Gets the telephone number, if any, for the specified <em>user</em>.
Arguments: - user (TUser) – The user whose telephone number should be retrieved.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.String>
Returns: The
System.Threading.Tasks.Task
that represents the asynchronous operation, containing the user’s telephone number, if any.Task<string> GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken)
-
GetPhoneNumberConfirmedAsync
(TUser, System.Threading.CancellationToken)¶ Gets a flag indicating whether the specified <em>user</em>’s telephone number has been confirmed.
Arguments: - user (TUser) – The user to return a flag for, indicating whether their telephone number is confirmed.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.Boolean>
Returns: The
System.Threading.Tasks.Task
that represents the asynchronous operation, returning true if the specified <em>user</em> has a confirmed telephone number otherwise false.Task<bool> GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken)
-
SetPhoneNumberAsync
(TUser, System.String, System.Threading.CancellationToken)¶ Sets the telephone number for the specified <em>user</em>.
Arguments: - user (TUser) – The user whose telephone number should be set.
- phoneNumber (System.String) – The telephone number to set.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The
System.Threading.Tasks.Task
that represents the asynchronous operation.Task SetPhoneNumberAsync(TUser user, string phoneNumber, CancellationToken cancellationToken)
-
SetPhoneNumberConfirmedAsync
(TUser, System.Boolean, System.Threading.CancellationToken)¶ Sets a flag indicating if the specified <em>user</em>’s phone number has been confirmed..
Arguments: - user (TUser) – The user whose telephone number confirmation status should be set.
- confirmed (System.Boolean) – A flag indicating whether the user’s telephone number has been confirmed.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The
System.Threading.Tasks.Task
that represents the asynchronous operation.Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken)
-