wip: 🧠 初步的框架

This commit is contained in:
tk
2023-08-25 15:33:42 +08:00
parent 57c1ba2002
commit 18b4d7547a
1014 changed files with 122380 additions and 2 deletions

View File

@ -0,0 +1,29 @@
using NetAdmin.Application.Services;
namespace NetAdmin.Cache;
/// <summary>
/// 缓存基类
/// </summary>
public abstract class CacheBase<TCacheContainer, TService> : ICache<TCacheContainer, TService>
where TService : IService
{
/// <summary>
/// Initializes a new instance of the <see cref="CacheBase{TCacheLoad, TService}" /> class.
/// </summary>
protected CacheBase(TCacheContainer cache, TService service)
{
Cache = cache;
Service = service;
}
/// <summary>
/// 缓存对象
/// </summary>
public TCacheContainer Cache { get; }
/// <summary>
/// 关联的服务
/// </summary>
public TService Service { get; }
}