mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-20 05:02:50 +08:00
style: 💄 jetbrains.resharper.globaltools 升级到 2023.3 (#70)
This commit is contained in:
parent
0059052b87
commit
904df511b9
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -15,7 +15,7 @@
|
||||
]
|
||||
},
|
||||
"jetbrains.resharper.globaltools": {
|
||||
"version": "2023.3.0-eap08",
|
||||
"version": "2023.3.0",
|
||||
"commands": [
|
||||
"jb"
|
||||
]
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -4,4 +4,4 @@ namespace NetAdmin.Domain.Attributes;
|
||||
/// 标记一个字段启用服务器时间
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class ServerTimeAttribute : Attribute { }
|
||||
public sealed class ServerTimeAttribute : Attribute;
|
@ -6,4 +6,4 @@ namespace NetAdmin.Domain.Attributes;
|
||||
/// 标记一个字段启用雪花编号生成
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class SnowflakeAttribute : Attribute { }
|
||||
public sealed class SnowflakeAttribute : Attribute;
|
@ -20,7 +20,7 @@ public record Sys_SiteMsgFlag : MutableEntity
|
||||
/// 用户编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public virtual long UserId { get; set; }
|
||||
public virtual long UserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户站内信状态
|
||||
|
@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgDept;
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-部门映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq { }
|
||||
public sealed record UpdateSiteMsgDeptReq : CreateSiteMsgDeptReq;
|
@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgFlag;
|
||||
/// <summary>
|
||||
/// 请求:更新站内信标记
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq { }
|
||||
public sealed record UpdateSiteMsgFlagReq : CreateSiteMsgFlagReq;
|
@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgRole;
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-角色映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq { }
|
||||
public sealed record UpdateSiteMsgRoleReq : CreateSiteMsgRoleReq;
|
@ -3,4 +3,4 @@ namespace NetAdmin.Domain.Dto.Sys.SiteMsgUser;
|
||||
/// <summary>
|
||||
/// 请求:更新站内信-用户映射
|
||||
/// </summary>
|
||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq { }
|
||||
public sealed record UpdateSiteMsgUserReq : CreateSiteMsgUserReq;
|
@ -8,7 +8,7 @@ public record GetModulesRsp : DataAbstraction
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块版本
|
||||
|
@ -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;
|
@ -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;
|
@ -4,4 +4,4 @@ namespace NetAdmin.Infrastructure.Attributes;
|
||||
/// 标记一个此字段(枚举)将通过接口暴露到前端
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Enum)]
|
||||
public sealed class ExportAttribute : Attribute { }
|
||||
public sealed class ExportAttribute : Attribute;
|
@ -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.
|
||||
|
@ -11,4 +11,4 @@ public interface IDeptModule : ICrudModule<CreateDeptReq, QueryDeptRsp // 创建
|
||||
, QueryDeptReq, QueryDeptRsp // 查询类型
|
||||
, UpdateDeptReq, QueryDeptRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IDicCatalogModule : ICrudModule<CreateDicCatalogReq, QueryDicCa
|
||||
, QueryDicCatalogReq, QueryDicCatalogRsp // 查询类型
|
||||
, UpdateDicCatalogReq, QueryDicCatalogRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IDicContentModule : ICrudModule<CreateDicContentReq, QueryDicCo
|
||||
, QueryDicContentReq, QueryDicContentRsp // 查询类型
|
||||
, UpdateDicContentReq, QueryDicContentRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IRequestLogModule : ICrudModule<CreateRequestLogReq, QueryReque
|
||||
, QueryRequestLogReq, QueryRequestLogRsp // 查询类型
|
||||
, NopReq, NopReq // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IRoleModule : ICrudModule<CreateRoleReq, QueryRoleRsp // 创建
|
||||
, QueryRoleReq, QueryRoleRsp // 查询类型
|
||||
, UpdateRoleReq, QueryRoleRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface ISiteMsgDeptModule : ICrudModule<CreateSiteMsgDeptReq, QuerySit
|
||||
, QuerySiteMsgDeptReq, QuerySiteMsgDeptRsp // 查询类型
|
||||
, UpdateSiteMsgDeptReq, QuerySiteMsgDeptRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface ISiteMsgFlagModule : ICrudModule<CreateSiteMsgFlagReq, QuerySit
|
||||
, QuerySiteMsgFlagReq, QuerySiteMsgFlagRsp // 查询类型
|
||||
, UpdateSiteMsgFlagReq, QuerySiteMsgFlagRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface ISiteMsgRoleModule : ICrudModule<CreateSiteMsgRoleReq, QuerySit
|
||||
, QuerySiteMsgRoleReq, QuerySiteMsgRoleRsp // 查询类型
|
||||
, UpdateSiteMsgRoleReq, QuerySiteMsgRoleRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface ISiteMsgUserModule : ICrudModule<CreateSiteMsgUserReq, QuerySit
|
||||
, QuerySiteMsgUserReq, QuerySiteMsgUserRsp // 查询类型
|
||||
, UpdateSiteMsgUserReq, QuerySiteMsgUserRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IUserProfileModule : ICrudModule<CreateUserProfileReq, QueryUse
|
||||
, QueryUserProfileReq, QueryUserProfileRsp // 查询类型
|
||||
, UpdateUserProfileReq, QueryUserProfileRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -11,4 +11,4 @@ public interface IExampleModule : ICrudModule<CreateExampleReq, QueryExampleRsp
|
||||
, QueryExampleReq, QueryExampleRsp // 查询类型
|
||||
, UpdateExampleReq, QueryExampleRsp // 修改类型
|
||||
, DelReq // 删除类型
|
||||
> { }
|
||||
>;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 缓存服务
|
||||
/// </summary>
|
||||
public interface ICacheService : IService, ICacheModule { }
|
||||
public interface ICacheService : IService, ICacheModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 人机验证服务
|
||||
/// </summary>
|
||||
public interface ICaptchaService : IService, ICaptchaModule { }
|
||||
public interface ICaptchaService : IService, ICaptchaModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 配置服务
|
||||
/// </summary>
|
||||
public interface IConfigService : IService, IConfigModule { }
|
||||
public interface IConfigService : IService, IConfigModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 常量服务
|
||||
/// </summary>
|
||||
public interface IConstantService : IService, IConstantModule { }
|
||||
public interface IConstantService : IService, IConstantModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 部门服务
|
||||
/// </summary>
|
||||
public interface IDeptService : IService, IDeptModule { }
|
||||
public interface IDeptService : IService, IDeptModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 开发服务
|
||||
/// </summary>
|
||||
public interface IDevService : IService, IDevModule { }
|
||||
public interface IDevService : IService, IDevModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 字典目录服务
|
||||
/// </summary>
|
||||
public interface IDicCatalogService : IService, IDicCatalogModule { }
|
||||
public interface IDicCatalogService : IService, IDicCatalogModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 字典内容服务
|
||||
/// </summary>
|
||||
public interface IDicContentService : IService, IDicContentModule { }
|
||||
public interface IDicContentService : IService, IDicContentModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 字典服务
|
||||
/// </summary>
|
||||
public interface IDicService : IService, IDicModule { }
|
||||
public interface IDicService : IService, IDicModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 文件服务
|
||||
/// </summary>
|
||||
public interface IFileService : IService, IFileModule { }
|
||||
public interface IFileService : IService, IFileModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 菜单服务
|
||||
/// </summary>
|
||||
public interface IMenuService : IService, IMenuModule { }
|
||||
public interface IMenuService : IService, IMenuModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 请求日志服务
|
||||
/// </summary>
|
||||
public interface IRequestLogService : IService, IRequestLogModule { }
|
||||
public interface IRequestLogService : IService, IRequestLogModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 角色服务
|
||||
/// </summary>
|
||||
public interface IRoleService : IService, IRoleModule { }
|
||||
public interface IRoleService : IService, IRoleModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 站内信-部门映射服务
|
||||
/// </summary>
|
||||
public interface ISiteMsgDeptService : IService, ISiteMsgDeptModule { }
|
||||
public interface ISiteMsgDeptService : IService, ISiteMsgDeptModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 站内信标记服务
|
||||
/// </summary>
|
||||
public interface ISiteMsgFlagService : IService, ISiteMsgFlagModule { }
|
||||
public interface ISiteMsgFlagService : IService, ISiteMsgFlagModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 站内信-角色映射服务
|
||||
/// </summary>
|
||||
public interface ISiteMsgRoleService : IService, ISiteMsgRoleModule { }
|
||||
public interface ISiteMsgRoleService : IService, ISiteMsgRoleModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 站内信服务
|
||||
/// </summary>
|
||||
public interface ISiteMsgService : IService, ISiteMsgModule { }
|
||||
public interface ISiteMsgService : IService, ISiteMsgModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 站内信-用户映射服务
|
||||
/// </summary>
|
||||
public interface ISiteMsgUserService : IService, ISiteMsgUserModule { }
|
||||
public interface ISiteMsgUserService : IService, ISiteMsgUserModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 工具服务
|
||||
/// </summary>
|
||||
public interface IToolsService : IService, IToolsModule { }
|
||||
public interface IToolsService : IService, IToolsModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 用户档案服务
|
||||
/// </summary>
|
||||
public interface IUserProfileService : IService, IUserProfileModule { }
|
||||
public interface IUserProfileService : IService, IUserProfileModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
/// <summary>
|
||||
/// 验证码服务
|
||||
/// </summary>
|
||||
public interface IVerifyCodeService : IService, IVerifyCodeModule { }
|
||||
public interface IVerifyCodeService : IService, IVerifyCodeModule;
|
@ -6,4 +6,4 @@ namespace NetAdmin.SysComponent.Application.Services.Tpl.Dependency;
|
||||
/// <summary>
|
||||
/// 示例服务
|
||||
/// </summary>
|
||||
public interface IExampleService : IService, IExampleModule { }
|
||||
public interface IExampleService : IService, IExampleModule;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user