This commit is contained in:
南浔
2025-07-31 22:52:41 +08:00
73 changed files with 7108 additions and 16 deletions
+12
View File
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Http;
namespace Public
{
public class ApiCallContext
{
public int UserId { get; set; }
public Dictionary<string, object> Parameters { get; set; } = new();
public HttpContext HttpContext { get; set; } = null!;
}
}
+8
View File
@@ -0,0 +1,8 @@
namespace Public
{
public interface IBillableApiHandler
{
/// <summary>执行 API 主逻辑</summary>
Task<object> ExecuteAsync(ApiCallContext context);
}
}
+13
View File
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.0" />
</ItemGroup>
</Project>