mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Enforces XML documentation on public members.
This commit is contained in:
1 parent
0daef2acab
commit
308402ad0e
202 files changed
+3901
-98
No files matched your search
@@ -11,7 +11,7 @@ namespace Lumina.DataAccess.Common.Dapper;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The SQLite provider stores <see cref="Guid"/> columns as upper case TEXT. Dapper falls back to Convert.ChangeType when materializing
|
||||
/// such columns into <see cref="Guid"/> properties. <see cref="Guid"/> has no string <see cref="TypeConverter"/>, so that conversion
|
||||
/// such columns into <see cref="Guid"/> properties. <see cref="Guid"/> has no string <see cref="System.ComponentModel.TypeConverter"/>, so that conversion
|
||||
/// throws an <see cref="InvalidCastException"/>; this handler performs the conversion explicitly instead, and writes the same upper case
|
||||
/// representation so raw key comparisons and foreign keys match the rows created by Entity Framework.
|
||||
/// </remarks>
|
||||
|
||||
@@ -124,6 +124,8 @@ internal sealed class RoleRepository : IRoleRepository
|
||||
/// Gets a <see cref="RoleEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the authorization role to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the role should be loaded together with the role itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved role should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="RoleEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<RoleEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -88,6 +88,8 @@ internal sealed class BookRepository : IBookRepository
|
||||
/// Gets a book by its Id.
|
||||
/// </summary>
|
||||
/// <param name="id">The Id of the book to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the book should be loaded together with the book itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved book should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="BookEntity"/>, or an error.</returns>
|
||||
public async Task<Result<BookEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -54,6 +54,8 @@ internal sealed class LibraryRepository : ILibraryRepository
|
||||
/// Gets a <see cref="LibraryEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The Id of the library to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the library should be loaded together with the library itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved library should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<LibraryEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -53,6 +53,8 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository
|
||||
/// Gets a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the library scan to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the library scan should be loaded together with the library scan itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved library scan should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="LibraryScanEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<LibraryScanEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
@@ -71,6 +73,7 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository
|
||||
/// <summary>
|
||||
/// Gets the media library scans that belong to a media library identified by <paramref name="libraryId"/>, for the previous month, from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The Id of the media library whose scans are retrieved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a collection of <see cref="LibraryScanEntity"/>, or an error.</returns>
|
||||
public async Task<Result<IEnumerable<LibraryScanEntity>>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken)
|
||||
|
||||
@@ -37,6 +37,8 @@ internal sealed class PluginRepository : IPluginRepository
|
||||
/// Gets a plugin by its Id.
|
||||
/// </summary>
|
||||
/// <param name="id">The Id of the plugin to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the plugin should be loaded together with the plugin itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved plugin should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="PluginEntity"/>, or an error.</returns>
|
||||
public async Task<Result<PluginEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -35,6 +35,8 @@ internal sealed class ScheduledJobExecutionRepository : IScheduledJobExecutionRe
|
||||
/// Gets an execution identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the execution to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the execution should be loaded together with the execution itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved execution should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobExecutionEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<ScheduledJobExecutionEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -39,6 +39,8 @@ internal sealed class ScheduledJobRepository : IScheduledJobRepository
|
||||
/// Gets a scheduled job identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the scheduled job to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the scheduled job should be loaded together with the scheduled job itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved scheduled job should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="ScheduledJobEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<ScheduledJobEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -180,6 +180,8 @@ internal sealed class UserRepository : IUserRepository
|
||||
/// Gets a <see cref="UserEntity"/> identified by <paramref name="id"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the user to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the user should be loaded together with the user itself.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved user should be tracked by the persistence medium, so that changes to it can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a <see cref="UserEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<UserEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -50,6 +50,8 @@ internal sealed class UserSettingsRepository : IUserSettingsRepository
|
||||
/// Gets the settings identified by <paramref name="id"/>, if they exist.
|
||||
/// </summary>
|
||||
/// <param name="id">The Id of the user settings to get.</param>
|
||||
/// <param name="shouldIncludeNavigationProperties">Whether the navigation properties of the user settings should be loaded together with the user settings themselves.</param>
|
||||
/// <param name="shouldTrackEntities">Whether the retrieved user settings should be tracked by the persistence medium, so that changes to them can be saved.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the <see cref="UserSettingsEntity"/> identified by <paramref name="id"/>, or an error.</returns>
|
||||
public async Task<Result<UserSettingsEntity?>> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -30,7 +30,7 @@ public class DataSeedService : IDataSeedService
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataSeedService"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param
|
||||
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param>
|
||||
/// <param name="dateTimeProvider">Injected service for time related concerns.</param>
|
||||
public DataSeedService(IUnitOfWork unitOfWork, IDateTimeProvider dateTimeProvider)
|
||||
{
|
||||
|
||||
@@ -23,39 +23,174 @@ namespace Lumina.DataAccess.Core.UoW;
|
||||
/// <remarks>To update the database: update-database -p Lumina.DataAccess -s Lumina.Presentation.Api</remarks>
|
||||
public class LuminaDbContext : DbContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the books stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<BookEntity> Books { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the artists stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<ArtistEntity> Artists { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the albums stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<AlbumEntity> Albums { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tracks stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<TrackEntity> Tracks { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the artwork of the music library items stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<MusicArtworkEntity> MusicArtwork { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata extracted from the music files discovered during a scan, stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<MusicLibraryScanItemMetadataEntity> MusicLibraryScanItemMetadata { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the users stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<UserEntity> Users { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the settings of the users stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<UserSettingsEntity> UserSettings { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media libraries stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryEntity> Libraries { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the scans of the media libraries stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryScanEntity> LibraryScans { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the results of the media library scans stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryScanResultEntity> LibraryScanResults { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the snapshots of the media library items produced by the scans, stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryScanSnapshotEntity> LibraryScanSnapshots { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the staging results of the media library scans, holding the discovered file system items, stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryScanStagingResultsEntity> LibraryScanStagingResults { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fingerprints of the scanned directories, holding their last write time, stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<DirectoryScanFingerprintEntity> DirectoryScanFingerprints { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the authorization roles stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<RoleEntity> Roles { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the associations between users and roles stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<UserRoleEntity> UserRoles { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the authorization permissions stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<PermissionEntity> Permissions { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the associations between users and permissions stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<UserPermissionEntity> UserPermissions { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the associations between roles and permissions stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<RolePermissionEntity> RolePermissions { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the plugins stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<PluginEntity> Plugins { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the metadata provider configurations of the media libraries stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryMetadataProviderConfigurationEntity> LibraryMetadataProviderConfigurations { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the artwork provider configurations of the media libraries stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryArtworkProviderConfigurationEntity> LibraryArtworkProviderConfigurations { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the book reader configurations of the media libraries stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<LibraryBookReaderConfigurationEntity> LibraryBookReaderConfigurations { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the themes stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<ThemeEntity> Themes { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media contributors stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<MediaContributorEntity> MediaContributors { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the participations of the media contributors in books stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<BookContributorEntity> BookContributors { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the scheduled jobs stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<ScheduledJobEntity> ScheduledJobs { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the executions of the scheduled jobs stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<ScheduledJobExecutionEntity> ScheduledJobExecutions { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display preferences of the scheduler page of the users stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<SchedulerDisplayPreferencesEntity> SchedulerDisplayPreferences { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the playlists stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<PlaylistEntity> Playlists { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the entries of the playlists stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<PlaylistEntryEntity> PlaylistEntries { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the favorites stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<FavoriteEntity> Favorites { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media consumption records stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<MediaConsumptionRecordEntity> MediaConsumptionRecords { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media resume points stored in the database.
|
||||
/// </summary>
|
||||
public virtual DbSet<MediaResumePointEntity> MediaResumePoints { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -198,6 +198,9 @@ public class UnitOfWork : IUnitOfWork, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the media contributor repository.
|
||||
/// </summary>
|
||||
public IMediaContributorRepository MediaContributorRepository
|
||||
{
|
||||
get
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in new issue
Block a user