Table of Contents

Class UserServiceRepositoryBase<TUserEntity>

Namespace
Tharga.Team.MongoDB
Assembly
Tharga.Team.MongoDB.dll
public abstract class UserServiceRepositoryBase<TUserEntity> : UserServiceBase, IUserService where TUserEntity : EntityBase, IUser

Type Parameters

TUserEntity
Inheritance
UserServiceRepositoryBase<TUserEntity>
Implements
Inherited Members

Constructors

UserServiceRepositoryBase(AuthenticationStateProvider, IUserRepository<TUserEntity>)

protected UserServiceRepositoryBase(AuthenticationStateProvider authenticationStateProvider, IUserRepository<TUserEntity> userRepository)

Parameters

authenticationStateProvider AuthenticationStateProvider
userRepository IUserRepository<TUserEntity>

Methods

CreateUserEntityAsync(ClaimsPrincipal, string)

protected abstract Task<TUserEntity> CreateUserEntityAsync(ClaimsPrincipal claimsPrincipal, string identity)

Parameters

claimsPrincipal ClaimsPrincipal
identity string

Returns

Task<TUserEntity>

GetAllAsync()

protected override IAsyncEnumerable<IUser> GetAllAsync()

Returns

IAsyncEnumerable<IUser>

GetUserAsync(ClaimsPrincipal)

protected override Task<IUser> GetUserAsync(ClaimsPrincipal claimsPrincipal)

Parameters

claimsPrincipal ClaimsPrincipal

Returns

Task<IUser>

SeedUserNameAsync(string, string)

Sets the user's display name only if it is currently null/empty. Used by the invitation-accept flow to promote the admin-entered invitation name into the new user's identity without clobbering an IdP-provided name.

public override Task SeedUserNameAsync(string userKey, string name)

Parameters

userKey string
name string

Returns

Task

SetUserNameAsync(string, string)

Always sets the user's display name. Used by the user self-edit flow where the caller has explicitly chosen a name for themselves.

public override Task SetUserNameAsync(string userKey, string name)

Parameters

userKey string
name string

Returns

Task