style: 💄 jetbrains.resharper.globaltools 升级到 2023.3 (#70)

This commit is contained in:
nsnail 2023-12-08 10:24:06 +08:00 committed by GitHub
parent 0059052b87
commit 904df511b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 82 additions and 87 deletions

View File

@ -17,7 +17,7 @@
<LangVersion>preview</LangVersion>
<MinVerDefaultPreReleaseIdentifiers>beta</MinVerDefaultPreReleaseIdentifiers>
<MinVerTagPrefix>v</MinVerTagPrefix>
<NoWarn>CA1707;IDE0005;IDE0008;IDE0010;IDE0028;IDE0055;IDE0160;IDE0300;IDE0305;RCS1141;RCS1142;RCS1181;S101;S1121;S1135;S125;S2094;S3604;S4663;SYSLIB1045</NoWarn>
<NoWarn>CA1707;IDE0005;IDE0008;IDE0010;IDE0028;IDE0055;IDE0160;IDE0300;IDE0305;RCS1141;RCS1142;RCS1181;S101;S1121;S1135;S125;S2094;S3604;S4663;SYSLIB1045;SA1010</NoWarn>
<Product>NetAdmin</Product>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/nsnail/NetAdmin.git</RepositoryUrl>

View File

@ -22,8 +22,8 @@
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
// ReSharper disable DuplicateResource
<data name="_1分钟内只能发送1次" xml:space="preserve"><value>1分钟内只能发送1次</value></data>
// ReSharper disable DuplicateResource
<data name="_1分钟内只能发送1次" xml:space="preserve"><value>1分钟内只能发送1次</value></data>
<data name="_6位数字" xml:space="preserve"><value>6位数字</value></data>
<data name="_8位以上数字字母组合" xml:space="preserve"><value>8位以上数字字母组合</value></data>
<data name="XML注释文件不存在" xml:space="preserve"><value>XML注释文件不存在</value></data>

View File

@ -15,7 +15,7 @@
]
},
"jetbrains.resharper.globaltools": {
"version": "2023.3.0-eap08",
"version": "2023.3.0",
"commands": [
"jb"
]

View File

@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Net.Http.Json;
using Microsoft.AspNetCore.Mvc.Testing;
using NetAdmin.Application.Modules;
using NetAdmin.BizServer.Host;
using NetAdmin.Domain.Dto.Dependency;
using NetAdmin.Domain.Dto.Sys.Api;
@ -22,7 +23,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
: WebApiTestBase<Startup>(factory, testOutputHelper), IToolsModule, ICacheModule, IApiModule, IConfigModule
{
/// <inheritdoc />
/// <inheritdoc cref="ICrudModule{TCreateReq,TCreateRsp,TQueryReq,TQueryRsp,TUpdateReq,TUpdateRsp,TDelReq}.BulkDeleteAsync" />
public Task<int> BulkDeleteAsync(BulkReq<DelReq> req)
{
throw new NotImplementedException();
@ -32,7 +33,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
[Fact]
public async Task<CacheStatisticsRsp> CacheStatisticsAsync()
{
var rsp = await PostAsync("/api/sys/cache/cache.statistics", null).ConfigureAwait(false);
var rsp = await PostAsync("/api/sys/cache/cache.statistics", null).ConfigureAwait(true);
Assert.Equal(HttpStatusCode.OK, rsp.StatusCode);
return default;
}
@ -49,7 +50,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
throw new NotImplementedException();
}
/// <inheritdoc />
/// <inheritdoc cref="ICrudModule{TCreateReq,TCreateRsp,TQueryReq,TQueryRsp,TUpdateReq,TUpdateRsp,TDelReq}.DeleteAsync" />
public Task<int> DeleteAsync(DelReq req)
{
throw new NotImplementedException();
@ -74,7 +75,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
{
var rsp = await PostAsync("/api/sys/cache/get.all.entries"
, JsonContent.Create(new PagedQueryReq<GetAllEntriesReq>()))
.ConfigureAwait(false);
.ConfigureAwait(true);
Assert.Equal(HttpStatusCode.OK, rsp.StatusCode);
return default;
}
@ -107,7 +108,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
[Fact]
public async Task<DateTime> GetServerUtcTimeAsync()
{
var response = await PostAsync("/api/sys/tools/get.server.utc.time", null).ConfigureAwait(false);
var response = await PostAsync("/api/sys/tools/get.server.utc.time", null).ConfigureAwait(true);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
return default;
}
@ -116,17 +117,11 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
[Fact]
public async Task<string> GetVersionAsync()
{
var response = await PostAsync("/api/sys/tools/version", null).ConfigureAwait(false);
var response = await PostAsync("/api/sys/tools/version", null).ConfigureAwait(true);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
return default;
}
/// <inheritdoc />
public Task<IEnumerable<(string Name, string Version)>> ModulesAsync()
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Task<PagedQueryRsp<QueryConfigRsp>> PagedQueryAsync(PagedQueryReq<QueryConfigReq> req)
{
@ -155,7 +150,7 @@ public class AllTests(WebApplicationFactory<Startup> factory, ITestOutputHelper
[Fact]
public async Task SyncAsync()
{
var response = await PostAsync("/api/sys/api/sync", null).ConfigureAwait(false);
var response = await PostAsync("/api/sys/api/sync", null).ConfigureAwait(true);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
}

View File

@ -4,4 +4,4 @@ namespace NetAdmin.Domain.Attributes;
/// 标记一个字段启用服务器时间
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class ServerTimeAttribute : Attribute { }
public sealed class ServerTimeAttribute : Attribute;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.Domain.Attributes;
/// 标记一个字段启用雪花编号生成
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class SnowflakeAttribute : Attribute { }
public sealed class SnowflakeAttribute : Attribute;

View File

@ -20,7 +20,7 @@ public record Sys_SiteMsgFlag : MutableEntity
/// 用户编号
/// </summary>
[JsonIgnore]
public virtual long UserId { get; set; }
public virtual long UserId { get; init; }
/// <summary>
/// 用户站内信状态

View File

@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
/// <summary>
/// 请求:更新站内信-部门映射
/// </summary>
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq { }
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq;

View File

@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
/// <summary>
/// 请求:更新站内信标记
/// </summary>
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq { }
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq;

View File

@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
/// <summary>
/// 请求:更新站内信-角色映射
/// </summary>
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq { }
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq;

View File

@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
/// <summary>
/// 请求:更新站内信-用户映射
/// </summary>
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq { }
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq;

View File

@ -8,7 +8,7 @@ public record GetModulesRsp : DataAbstraction
/// <summary>
/// 模块名称
/// </summary>
public string Name { get; set; }
public string Name { get; init; }
/// <summary>
/// 模块版本

View File

@ -4,4 +4,4 @@ namespace NetAdmin.Host.Attributes;
/// 标记一个Action其响应的json结果会被删除值为null的节点
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public sealed class RemoveNullNodeAttribute : Attribute { }
public sealed class RemoveNullNodeAttribute : Attribute;

View File

@ -5,4 +5,4 @@ namespace NetAdmin.Host.Filters;
/// <inheritdoc cref="NetAdmin.Host.Filters.ApiResultHandler{T}" />
[SuppressSniffer]
[UnifyModel(typeof(RestfulInfo<>))]
public sealed class DefaultApiResultHandler : ApiResultHandler<RestfulInfo<object>>, IUnifyResultProvider { }
public sealed class DefaultApiResultHandler : ApiResultHandler<RestfulInfo<object>>, IUnifyResultProvider;

View File

@ -4,4 +4,4 @@ namespace NetAdmin.Infrastructure.Attributes;
/// 标记一个此字段(枚举)将通过接口暴露到前端
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Enum)]
public sealed class ExportAttribute : Attribute { }
public sealed class ExportAttribute : Attribute;

View File

@ -9,7 +9,7 @@ public sealed class XmlCommentReader : ISingleton
{
private const string _XPATH = "//doc/members/member[@name=\"{0}\"]";
private static readonly Regex _regex = new(@"`\d+");
private readonly List<XmlDocument> _xmlDocuments = new();
private readonly List<XmlDocument> _xmlDocuments = [];
/// <summary>
/// Initializes a new instance of the <see cref="XmlCommentReader" /> class.

View File

@ -11,4 +11,4 @@ public interface IDeptModule : ICrudModule<CreateDeptReq, QueryDeptRsp // 创建
, QueryDeptReq, QueryDeptRsp // 查询类型
, UpdateDeptReq, QueryDeptRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IDicCatalogModule : ICrudModule<CreateDicCatalogReq, QueryDicCa
, QueryDicCatalogReq, QueryDicCatalogRsp // 查询类型
, UpdateDicCatalogReq, QueryDicCatalogRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IDicContentModule : ICrudModule<CreateDicContentReq, QueryDicCo
, QueryDicContentReq, QueryDicContentRsp // 查询类型
, UpdateDicContentReq, QueryDicContentRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IRequestLogModule : ICrudModule<CreateRequestLogReq, QueryReque
, QueryRequestLogReq, QueryRequestLogRsp // 查询类型
, NopReq, NopReq // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IRoleModule : ICrudModule<CreateRoleReq, QueryRoleRsp // 创建
, QueryRoleReq, QueryRoleRsp // 查询类型
, UpdateRoleReq, QueryRoleRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface ISiteMsgDeptModule : ICrudModule<CreateSiteMsgDeptReq, QuerySit
, QuerySiteMsgDeptReq, QuerySiteMsgDeptRsp // 查询类型
, UpdateSiteMsgDeptReq, QuerySiteMsgDeptRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface ISiteMsgFlagModule : ICrudModule<CreateSiteMsgFlagReq, QuerySit
, QuerySiteMsgFlagReq, QuerySiteMsgFlagRsp // 查询类型
, UpdateSiteMsgFlagReq, QuerySiteMsgFlagRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface ISiteMsgRoleModule : ICrudModule<CreateSiteMsgRoleReq, QuerySit
, QuerySiteMsgRoleReq, QuerySiteMsgRoleRsp // 查询类型
, UpdateSiteMsgRoleReq, QuerySiteMsgRoleRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface ISiteMsgUserModule : ICrudModule<CreateSiteMsgUserReq, QuerySit
, QuerySiteMsgUserReq, QuerySiteMsgUserRsp // 查询类型
, UpdateSiteMsgUserReq, QuerySiteMsgUserRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IUserProfileModule : ICrudModule<CreateUserProfileReq, QueryUse
, QueryUserProfileReq, QueryUserProfileRsp // 查询类型
, UpdateUserProfileReq, QueryUserProfileRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -11,4 +11,4 @@ public interface IExampleModule : ICrudModule<CreateExampleReq, QueryExampleRsp
, QueryExampleReq, QueryExampleRsp // 查询类型
, UpdateExampleReq, QueryExampleRsp // 修改类型
, DelReq // 删除类型
> { }
>;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 缓存服务
/// </summary>
public interface ICacheService : IService, ICacheModule { }
public interface ICacheService : IService, ICacheModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 人机验证服务
/// </summary>
public interface ICaptchaService : IService, ICaptchaModule { }
public interface ICaptchaService : IService, ICaptchaModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 配置服务
/// </summary>
public interface IConfigService : IService, IConfigModule { }
public interface IConfigService : IService, IConfigModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 常量服务
/// </summary>
public interface IConstantService : IService, IConstantModule { }
public interface IConstantService : IService, IConstantModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 部门服务
/// </summary>
public interface IDeptService : IService, IDeptModule { }
public interface IDeptService : IService, IDeptModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 开发服务
/// </summary>
public interface IDevService : IService, IDevModule { }
public interface IDevService : IService, IDevModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 字典目录服务
/// </summary>
public interface IDicCatalogService : IService, IDicCatalogModule { }
public interface IDicCatalogService : IService, IDicCatalogModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 字典内容服务
/// </summary>
public interface IDicContentService : IService, IDicContentModule { }
public interface IDicContentService : IService, IDicContentModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 字典服务
/// </summary>
public interface IDicService : IService, IDicModule { }
public interface IDicService : IService, IDicModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 文件服务
/// </summary>
public interface IFileService : IService, IFileModule { }
public interface IFileService : IService, IFileModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 菜单服务
/// </summary>
public interface IMenuService : IService, IMenuModule { }
public interface IMenuService : IService, IMenuModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 请求日志服务
/// </summary>
public interface IRequestLogService : IService, IRequestLogModule { }
public interface IRequestLogService : IService, IRequestLogModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 角色服务
/// </summary>
public interface IRoleService : IService, IRoleModule { }
public interface IRoleService : IService, IRoleModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 站内信-部门映射服务
/// </summary>
public interface ISiteMsgDeptService : IService, ISiteMsgDeptModule { }
public interface ISiteMsgDeptService : IService, ISiteMsgDeptModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 站内信标记服务
/// </summary>
public interface ISiteMsgFlagService : IService, ISiteMsgFlagModule { }
public interface ISiteMsgFlagService : IService, ISiteMsgFlagModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 站内信-角色映射服务
/// </summary>
public interface ISiteMsgRoleService : IService, ISiteMsgRoleModule { }
public interface ISiteMsgRoleService : IService, ISiteMsgRoleModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 站内信服务
/// </summary>
public interface ISiteMsgService : IService, ISiteMsgModule { }
public interface ISiteMsgService : IService, ISiteMsgModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 站内信-用户映射服务
/// </summary>
public interface ISiteMsgUserService : IService, ISiteMsgUserModule { }
public interface ISiteMsgUserService : IService, ISiteMsgUserModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 工具服务
/// </summary>
public interface IToolsService : IService, IToolsModule { }
public interface IToolsService : IService, IToolsModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 用户档案服务
/// </summary>
public interface IUserProfileService : IService, IUserProfileModule { }
public interface IUserProfileService : IService, IUserProfileModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
/// <summary>
/// 验证码服务
/// </summary>
public interface IVerifyCodeService : IService, IVerifyCodeModule { }
public interface IVerifyCodeService : IService, IVerifyCodeModule;

View File

@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Tpl.Dependency;
/// <summary>
/// 示例服务
/// </summary>
public interface IExampleService : IService, IExampleModule { }
public interface IExampleService : IService, IExampleModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 接口缓存
/// </summary>
public interface IApiCache : ICache<IDistributedCache, IApiService>, IApiModule { }
public interface IApiCache : ICache<IDistributedCache, IApiService>, IApiModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 缓存缓存
/// </summary>
public interface ICacheCache : ICache<IDistributedCache, ICacheService>, ICacheModule { }
public interface ICacheCache : ICache<IDistributedCache, ICacheService>, ICacheModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 配置缓存
/// </summary>
public interface IConfigCache : ICache<IDistributedCache, IConfigService>, IConfigModule { }
public interface IConfigCache : ICache<IDistributedCache, IConfigService>, IConfigModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 常量缓存
/// </summary>
public interface IConstantCache : ICache<IDistributedCache, IConstantService>, IConstantModule { }
public interface IConstantCache : ICache<IDistributedCache, IConstantService>, IConstantModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 部门缓存
/// </summary>
public interface IDeptCache : ICache<IDistributedCache, IDeptService>, IDeptModule { }
public interface IDeptCache : ICache<IDistributedCache, IDeptService>, IDeptModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 开发缓存
/// </summary>
public interface IDevCache : ICache<IDistributedCache, IDevService>, IDevModule { }
public interface IDevCache : ICache<IDistributedCache, IDevService>, IDevModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 字典缓存
/// </summary>
public interface IDicCache : ICache<IDistributedCache, IDicService>, IDicModule { }
public interface IDicCache : ICache<IDistributedCache, IDicService>, IDicModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 字典目录缓存
/// </summary>
public interface IDicCatalogCache : ICache<IDistributedCache, IDicCatalogService>, IDicCatalogModule { }
public interface IDicCatalogCache : ICache<IDistributedCache, IDicCatalogService>, IDicCatalogModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 字典内容缓存
/// </summary>
public interface IDicContentCache : ICache<IDistributedCache, IDicContentService>, IDicContentModule { }
public interface IDicContentCache : ICache<IDistributedCache, IDicContentService>, IDicContentModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 文件缓存
/// </summary>
public interface IFileCache : ICache<IDistributedCache, IFileService>, IFileModule { }
public interface IFileCache : ICache<IDistributedCache, IFileService>, IFileModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 菜单缓存
/// </summary>
public interface IMenuCache : ICache<IDistributedCache, IMenuService>, IMenuModule { }
public interface IMenuCache : ICache<IDistributedCache, IMenuService>, IMenuModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 请求日志缓存
/// </summary>
public interface IRequestLogCache : ICache<IDistributedCache, IRequestLogService>, IRequestLogModule { }
public interface IRequestLogCache : ICache<IDistributedCache, IRequestLogService>, IRequestLogModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 角色缓存
/// </summary>
public interface IRoleCache : ICache<IDistributedCache, IRoleService>, IRoleModule { }
public interface IRoleCache : ICache<IDistributedCache, IRoleService>, IRoleModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 站内信缓存
/// </summary>
public interface ISiteMsgCache : ICache<IDistributedCache, ISiteMsgService>, ISiteMsgModule { }
public interface ISiteMsgCache : ICache<IDistributedCache, ISiteMsgService>, ISiteMsgModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 站内信-部门映射缓存
/// </summary>
public interface ISiteMsgDeptCache : ICache<IDistributedCache, ISiteMsgDeptService>, ISiteMsgDeptModule { }
public interface ISiteMsgDeptCache : ICache<IDistributedCache, ISiteMsgDeptService>, ISiteMsgDeptModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 站内信标记缓存
/// </summary>
public interface ISiteMsgFlagCache : ICache<IDistributedCache, ISiteMsgFlagService>, ISiteMsgFlagModule { }
public interface ISiteMsgFlagCache : ICache<IDistributedCache, ISiteMsgFlagService>, ISiteMsgFlagModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 站内信-角色映射缓存
/// </summary>
public interface ISiteMsgRoleCache : ICache<IDistributedCache, ISiteMsgRoleService>, ISiteMsgRoleModule { }
public interface ISiteMsgRoleCache : ICache<IDistributedCache, ISiteMsgRoleService>, ISiteMsgRoleModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 站内信-用户映射缓存
/// </summary>
public interface ISiteMsgUserCache : ICache<IDistributedCache, ISiteMsgUserService>, ISiteMsgUserModule { }
public interface ISiteMsgUserCache : ICache<IDistributedCache, ISiteMsgUserService>, ISiteMsgUserModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 工具缓存
/// </summary>
public interface IToolsCache : ICache<IDistributedCache, IToolsService>, IToolsModule { }
public interface IToolsCache : ICache<IDistributedCache, IToolsService>, IToolsModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 用户档案缓存
/// </summary>
public interface IUserProfileCache : ICache<IDistributedCache, IUserProfileService>, IUserProfileModule { }
public interface IUserProfileCache : ICache<IDistributedCache, IUserProfileService>, IUserProfileModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Sys.Dependency;
/// <summary>
/// 验证码缓存
/// </summary>
public interface IVerifyCodeCache : ICache<IDistributedCache, IVerifyCodeService>, IVerifyCodeModule { }
public interface IVerifyCodeCache : ICache<IDistributedCache, IVerifyCodeService>, IVerifyCodeModule;

View File

@ -7,4 +7,4 @@ namespace NetAdmin.SysComponent.Cache.Tpl.Dependency;
/// <summary>
/// 示例缓存
/// </summary>
public interface IExampleCache : ICache<IDistributedCache, IExampleService>, IExampleModule { }
public interface IExampleCache : ICache<IDistributedCache, IExampleService>, IExampleModule;

View File

@ -18,14 +18,14 @@ public sealed class CacheCleaner : IEventSubscriber
/// 用户缓存清理
/// </summary>
[EventSubscribe(nameof(UserUpdatedEvent))]
public async Task RemoveUserInfoAsync(EventHandlerExecutingContext context)
public Task RemoveUserInfoAsync(EventHandlerExecutingContext context)
{
if (context.Source is not UserUpdatedEvent userUpdatedEvent) {
return;
return Task.CompletedTask;
}
var cache = App.GetService<IUserCache>();
cache.Service.UserToken = ContextUserToken.Create(userUpdatedEvent.Data);
await cache.RemoveUserInfoAsync().ConfigureAwait(false);
return cache.RemoveUserInfoAsync();
}
}