IUserPhoneNumberStore<TUser> Interface

Summary

Provides an abstraction for a store containing users’ telephone numbers.

Syntax

public interface IUserPhoneNumberStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class

GitHub

View on GitHub

interface Microsoft.AspNet.Identity.IUserPhoneNumberStore<TUser>

Methods

GetPhoneNumberAsync(TUser, System.Threading.CancellationToken)

Gets the telephone number, if any, for the specified user, as an asynchronous operation.

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 <see cref=”T: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 user‘s telephone number has been confirmed, as an asynchronous operation.

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 <see cref=”T:System.Threading.Tasks.Task” /> that represents the asynchronous operation, returning true if the specified <paramref name=”user” /> 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 user, as an asynchronous operation.

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 <see cref=”T: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 user‘s phone number has been confirmed, as an asynchronous operation..

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 <see cref=”T:System.Threading.Tasks.Task” /> that represents the asynchronous operation.

Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken)