Asgard.Abstractions
4.0.5
dotnet add package Asgard.Abstractions --version 4.0.5
NuGet\Install-Package Asgard.Abstractions -Version 4.0.5
<PackageReference Include="Asgard.Abstractions" Version="4.0.5" />
<PackageVersion Include="Asgard.Abstractions" Version="4.0.5" />
<PackageReference Include="Asgard.Abstractions" />
paket add Asgard.Abstractions --version 4.0.5
#r "nuget: Asgard.Abstractions, 4.0.5"
#:package Asgard.Abstractions@4.0.5
#addin nuget:?package=Asgard.Abstractions&version=4.0.5
#tool nuget:?package=Asgard.Abstractions&version=4.0.5
Asgard.Abstractions
Asgard.Abstractions 是 Asgard 框架的核心契约包,负责提供稳定的接口、配置模型和共享基础类型。
如果你希望依赖 Asgard 的公共定义,但暂时不引入缓存、消息、任务调度、插件加载等运行时实现,这个包就是最轻量的入口。
适用场景
- 只想依赖 Asgard 的契约层,避免提前引入完整运行时
- 为业务模块、插件或基础设施扩展定义面向接口的集成代码
- 在多个项目之间共享 Asgard 配置模型、实体基类和插件契约
包含内容
- 缓存、任务、消息、插件、安全、系统配置等配置模型
- 仓储、任务、消息端点、插件等核心接口
- 共享实体基类和常用标识类型
- 上层包会复用的序列化辅助类型与系统配置标记
安装
dotnet add package Asgard.Abstractions
快速开始
using Asgard.Abstractions.Job;
public sealed class SampleJob : IJob
{
public Task ExecuteAsync(
IJobExecutionContext context,
CancellationToken cancellationToken = default)
=> Task.CompletedTask;
}
何时升级到其他包
- 需要默认基础设施实现:使用
Asgard.Core - 需要 ASP.NET Core 相关抽象:使用
Asgard.Abstractions.AspNetCore - 需要 ASP.NET Core 运行时集成:使用
Asgard.AspNetCore.Core - 需要完整宿主启动体验:使用
Asgard.Yggdrasil.AspNetCore
相关资源
- 主仓库:BenLampson/Asgard
- 文档目录:src/doc
- Asgard Skills 仓库:BenLampson/Asgard.Skills
Asgard.Skills 是 Asgard 的官方 AI 技能仓库,包含框架约定、开发模式和配套技能定义,适合在 AI 协作开发时直接接入使用。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FreeSql (>= 3.5.307)
- FreeSql.DbContext (>= 3.5.307)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Asgard.Abstractions:
| Package | Downloads |
|---|---|
|
Asgard.Core
Asgard.Core 包含框架的具体基础设施实现,涵盖缓存、任务调度、消息、日志、插件、安全和配置,构建在 Asgard.Abstractions 的契约之上。 |
|
|
Asgard.Abstractions.AspNetCore
Asgard.Abstractions.AspNetCore 定义了 Asgard 框架中面向 ASP.NET Core 的契约,包括控制器基类、请求模型、主机选项、中间件抽象和身份上下文接口,用于可复用的 Web 集成。 |
|
|
Asgard.AspNetCore.Core
Asgard.AspNetCore.Core 为 Asgard 框架提供 ASP.NET Core 运行时实现,包括租户感知中间件、身份上下文集成和服务注册帮助器,构建在共享抽象包之上。 |
|
|
Asgard.TsGen
Asgard.TsGen generates reusable TypeScript clients by scanning ASP.NET Core controllers decorated with AsgardTsGenAttribute. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.5 | 39 | 4/11/2026 |
| 4.0.4 | 42 | 4/10/2026 |
| 4.0.3 | 45 | 4/9/2026 |
| 4.0.2 | 62 | 4/8/2026 |
| 4.0.1 | 124 | 4/3/2026 |
| 4.0.0 | 138 | 4/1/2026 |
| 4.0.0-preview.7 | 50 | 3/31/2026 |
| 4.0.0-preview.6 | 48 | 3/30/2026 |
| 4.0.0-preview.5 | 135 | 3/28/2026 |
| 4.0.0-preview.4 | 52 | 3/27/2026 |
| 4.0.0-preview.3 | 48 | 3/27/2026 |
| 4.0.0-preview.2 | 44 | 3/27/2026 |
| 4.0.0-preview.1 | 48 | 3/27/2026 |