add xmldoc comments

This commit is contained in:
Aaron Po
2026-06-18 23:25:50 -04:00
parent 6a66619c70
commit 3034020d56
52 changed files with 1681 additions and 7 deletions

View File

@@ -2,13 +2,33 @@ using Domain.Entities;
namespace Service.UserManagement.User;
/// <summary>
/// Defines operations for retrieving and updating user accounts.
/// </summary>
public interface IUserService
{
/// <summary>
/// Retrieves all user accounts, optionally paginated.
/// </summary>
/// <param name="limit">The maximum number of results to return, or <c>null</c> for no limit.</param>
/// <param name="offset">The number of results to skip, or <c>null</c> to start from the beginning.</param>
/// <returns>A collection of <see cref="UserAccount"/> entities.</returns>
Task<IEnumerable<UserAccount>> GetAllAsync(
int? limit = null,
int? offset = null
);
/// <summary>
/// Retrieves a user account by its unique identifier.
/// </summary>
/// <param name="id">The unique identifier of the user account.</param>
/// <returns>The matching <see cref="UserAccount"/>.</returns>
Task<UserAccount> GetByIdAsync(Guid id);
/// <summary>
/// Updates an existing user account.
/// </summary>
/// <param name="userAccount">The user account containing the updated data.</param>
/// <returns>A task that completes once the update has finished.</returns>
Task UpdateAsync(UserAccount userAccount);
}

View File

@@ -4,8 +4,18 @@ using Infrastructure.Repository.UserAccount;
namespace Service.UserManagement.User;
/// <summary>
/// Handles retrieval and update of user accounts.
/// </summary>
/// <param name="repository">Repository used to persist and query user account data.</param>
public class UserService(IUserAccountRepository repository) : IUserService
{
/// <summary>
/// Retrieves all user accounts, optionally paginated.
/// </summary>
/// <param name="limit">The maximum number of results to return, or <c>null</c> for no limit.</param>
/// <param name="offset">The number of results to skip, or <c>null</c> to start from the beginning.</param>
/// <returns>A collection of <see cref="UserAccount"/> entities.</returns>
public async Task<IEnumerable<UserAccount>> GetAllAsync(
int? limit = null,
int? offset = null
@@ -14,6 +24,12 @@ public class UserService(IUserAccountRepository repository) : IUserService
return await repository.GetAllAsync(limit, offset);
}
/// <summary>
/// Retrieves a user account by its unique identifier.
/// </summary>
/// <param name="id">The unique identifier of the user account.</param>
/// <returns>The matching <see cref="UserAccount"/>.</returns>
/// <exception cref="NotFoundException">Thrown when no user account exists with the given <paramref name="id"/>.</exception>
public async Task<UserAccount> GetByIdAsync(Guid id)
{
var user = await repository.GetByIdAsync(id);
@@ -22,6 +38,11 @@ public class UserService(IUserAccountRepository repository) : IUserService
return user;
}
/// <summary>
/// Updates an existing user account.
/// </summary>
/// <param name="userAccount">The user account containing the updated data.</param>
/// <returns>A task that completes once the update has finished.</returns>
public async Task UpdateAsync(UserAccount userAccount)
{
await repository.UpdateAsync(userAccount);