Class NoOpApplicationRoleStore
- Namespace
- Kentico.Membership
- Assembly
- Kentico.Membership.dll
A no-operation implementation of the ASP.NET Identity role store. All methods return System.NotImplementedException.
public sealed class NoOpApplicationRoleStore
- Inheritance
-
objectNoOpApplicationRoleStore
- Extension Methods
Remarks
Adding and configuring Identity for an application via AddIdentity{TUser, TRole} requires both an IdentityUser and an IdentityRole implementation. However, the Xperience membership does not support roles. This class, together with NoOpApplicationRole is a placeholder to simplify the configuration process. Both implementations contain no logic and are not called from anywhere by Xperience.
Methods
CreateAsync(NoOpApplicationRole, CancellationToken)
Creates a new role in a store as an asynchronous operation.
public Task<IdentityResult> CreateAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role to create in the store.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<IdentityResult>
A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.
DeleteAsync(NoOpApplicationRole, CancellationToken)
Deletes a role from the store as an asynchronous operation.
public Task<IdentityResult> DeleteAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role to delete from the store.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<IdentityResult>
A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
FindByIdAsync(string, CancellationToken)
Finds the role who has the specified ID as an asynchronous operation.
public Task<NoOpApplicationRole> FindByIdAsync(string roleId, CancellationToken cancellationToken)
Parameters
roleId
stringThe role ID to look for.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<NoOpApplicationRole>
A System.Threading.Tasks.Task<TResult> that result of the look up.
FindByNameAsync(string, CancellationToken)
Finds the role who has the specified normalized name as an asynchronous operation.
public Task<NoOpApplicationRole> FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken)
Parameters
normalizedRoleName
stringThe normalized role name to look for.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<NoOpApplicationRole>
A System.Threading.Tasks.Task<TResult> that result of the look up.
GetNormalizedRoleNameAsync(NoOpApplicationRole, CancellationToken)
Get a role's normalized name as an asynchronous operation.
public Task<string> GetNormalizedRoleNameAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role whose normalized name should be retrieved.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<string>
A System.Threading.Tasks.Task<TResult> that contains the name of the role.
GetRoleIdAsync(NoOpApplicationRole, CancellationToken)
Gets the ID for a role from the store as an asynchronous operation.
public Task<string> GetRoleIdAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role whose ID should be returned.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<string>
A System.Threading.Tasks.Task<TResult> that contains the ID of the role.
GetRoleNameAsync(NoOpApplicationRole, CancellationToken)
Gets the name of a role from the store as an asynchronous operation.
public Task<string> GetRoleNameAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role whose name should be returned.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<string>
A System.Threading.Tasks.Task<TResult> that contains the name of the role.
SetNormalizedRoleNameAsync(NoOpApplicationRole, string, CancellationToken)
Set a role's normalized name as an asynchronous operation.
public Task SetNormalizedRoleNameAsync(NoOpApplicationRole role, string normalizedName, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role whose normalized name should be set.
normalizedName
stringThe normalized name to set
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task
The System.Threading.Tasks.Task that represents the asynchronous operation.
SetRoleNameAsync(NoOpApplicationRole, string, CancellationToken)
Sets the name of a role in the store as an asynchronous operation.
public Task SetRoleNameAsync(NoOpApplicationRole role, string roleName, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role whose name should be set.
roleName
stringThe name of the role.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task
The System.Threading.Tasks.Task that represents the asynchronous operation.
UpdateAsync(NoOpApplicationRole, CancellationToken)
Updates a role in a store as an asynchronous operation.
public Task<IdentityResult> UpdateAsync(NoOpApplicationRole role, CancellationToken cancellationToken)
Parameters
role
NoOpApplicationRoleThe role to update in the store.
cancellationToken
CancellationTokenThe System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.
Returns
- Task<IdentityResult>
A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.