RoleValidator Class¶
Constructors¶
-
RoleValidator
(Microsoft.AspNet.Identity.IdentityErrorDescriber)¶ Creates a new instance of RoleValidator<TRole>/
Arguments: - errors (Microsoft.AspNet.Identity.IdentityErrorDescriber) – The Microsoft.AspNet.Identity.IdentityErrorDescriber used to provider error messages.
public RoleValidator(IdentityErrorDescriber errors = null)
-
Methods¶
-
ValidateAsync<TRole>
(Microsoft.AspNet.Identity.RoleManager<TRole>, TRole)¶ Validates a role as an asynchronous operation.
Arguments: - manager (Microsoft.AspNet.Identity.RoleManager{{TRole}}) – The Microsoft.AspNet.Identity.RoleManager`1 managing the role store.
- role ({TRole}) – The role to validate.
Return type: System.Threading.Tasks.Task{Microsoft.AspNet.Identity.IdentityResult}
Returns: A <see cref=”T:System.Threading.Tasks.Task`1” /> that represents the <see cref=”T:Microsoft.AspNet.Identity.IdentityResult” /> of the asynchronous validation.
public virtual Task<IdentityResult> ValidateAsync<TRole>(RoleManager<TRole> manager, TRole role)where TRole : class
-