refactor: ♻️ 主题颜色变量封装 (#192)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-11-11 16:14:51 +08:00
committed by GitHub
parent f00046265a
commit 4d63bd6bf5
22 changed files with 61 additions and 68 deletions

View File

@ -8,15 +8,14 @@ public sealed record SeedDataInsertedEvent : DataAbstraction, IEventSource
/// <summary>
/// Initializes a new instance of the <see cref="SeedDataInsertedEvent" /> class.
/// </summary>
public SeedDataInsertedEvent(int insertedCount)
public SeedDataInsertedEvent(int insertedCount, bool isConsumOnce = false)
{
IsConsumOnce = isConsumOnce;
InsertedCount = insertedCount;
CreatedTime = DateTime.Now;
EventId = nameof(SeedDataInsertedEvent);
}
/// <inheritdoc />
public CancellationToken CancellationToken { get; }
/// <inheritdoc />
public DateTime CreatedTime { get; }
@ -27,10 +26,13 @@ public sealed record SeedDataInsertedEvent : DataAbstraction, IEventSource
public bool IsConsumOnce { get; }
/// <inheritdoc />
public object Payload { get; }
public CancellationToken CancellationToken { get; init; }
/// <summary>
/// 插入数量
/// </summary>
public int InsertedCount { get; set; }
/// <inheritdoc />
public object Payload { get; init; }
}

View File

@ -52,6 +52,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase<IExa
/// <summary>
/// 示例是否存在
/// </summary>
[NonAction]
public Task<bool> ExistAsync(QueryReq<QueryExampleReq> req)
{
return Cache.ExistAsync(req);
@ -60,6 +61,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase<IExa
/// <summary>
/// 导出示例
/// </summary>
[NonAction]
public Task<IActionResult> ExportAsync(QueryReq<QueryExampleReq> req)
{
return Cache.ExportAsync(req);
@ -84,6 +86,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase<IExa
/// <summary>
/// 查询示例
/// </summary>
[NonAction]
public Task<IEnumerable<QueryExampleRsp>> QueryAsync(QueryReq<QueryExampleReq> req)
{
return Cache.QueryAsync(req);

View File

@ -5,7 +5,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0-rc.2.24474.3"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0-pre.42">
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0-pre.49">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>