mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Adds the server-side theme repository and reworks the web theme engine onto it
This commit is contained in:
1 parent
85928f7c3c
commit
bf8faba24d
136 files changed
+6942
-1197
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Application.Common.DataAccess.Entities.Themes;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Repositories.Themes;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the repository for themes.
|
||||
/// </summary>
|
||||
public interface IThemeRepository : IRepository<ThemeEntity>,
|
||||
IGetAllRepositoryAction<ThemeEntity>,
|
||||
IInsertRepositoryAction<ThemeEntity>,
|
||||
IUpdateRepositoryAction<ThemeEntity>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a theme identified by its manifest <paramref name="themeId"/> from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="themeId">The manifest id of the theme to get.</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="ThemeEntity"/> identified by <paramref name="themeId"/>, or an error.</returns>
|
||||
Task<Result<ThemeEntity?>> GetByThemeIdAsync(string themeId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the currently active theme from the storage medium.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either the active <see cref="ThemeEntity"/>, or an error.</returns>
|
||||
Task<Result<ThemeEntity?>> GetCurrentAsync(CancellationToken cancellationToken);
|
||||
}
|
||||
Reference in new issue
Block a user