Galosys.Foundation.Integration.Express.Abstractions
26.8.3.1
dotnet add package Galosys.Foundation.Integration.Express.Abstractions --version 26.8.3.1
NuGet\Install-Package Galosys.Foundation.Integration.Express.Abstractions -Version 26.8.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Galosys.Foundation.Integration.Express.Abstractions" Version="26.8.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Galosys.Foundation.Integration.Express.Abstractions" Version="26.8.3.1" />
<PackageReference Include="Galosys.Foundation.Integration.Express.Abstractions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Galosys.Foundation.Integration.Express.Abstractions --version 26.8.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Galosys.Foundation.Integration.Express.Abstractions, 26.8.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Galosys.Foundation.Integration.Express.Abstractions@26.8.3.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Galosys.Foundation.Integration.Express.Abstractions&version=26.8.3.1
#tool nuget:?package=Galosys.Foundation.Integration.Express.Abstractions&version=26.8.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Galosys.Foundation.Integration.Express.Abstractions
快递模块抽象层,参考 Integration.Payment.Abstractions 的 PluginRegistry 模式实现多 Provider 路由。
依赖
Galosys.Foundation.Core(PluginRegistry / Plugin)
核心类型
| 类型 | 说明 |
|---|---|
IExpressChannel : Plugin<ExpressRequest> |
快递服务提供者接口 |
ExpressRequest |
路由请求(CarrierCode + Provider 双字段) |
ExpressResponse<T> |
统一响应模型 |
ExpressClient |
调度门面,基于 PluginRegistry 解析透传 |
DI 注册
services.AddExpress();
各 Provider 通过 AddExpressDirect() 注册:
services.AddExpress()
.AddExpressDirect();
核心异常
| 类型 | 说明 |
|---|---|
ExpressException |
快递异常,包含 ErrorCode、CarrierCode、RawResponse |
ExpressErrorCode |
错误码枚举(Success, InvalidParameter, AuthenticationFailed, OrderNotFound, RateLimited, ServiceUnavailable, Unknown) |
使用
var dispatcher = sp.GetRequiredService<ExpressClient>();
// 按快递商编码路由
var tracks = await dispatcher.TrackQueryAsync(
new ExpressRequest { CarrierCode = "SF" },
new TrackQueryRequest { WaybillNo = "SF1234567890", SenderContact = "8012" });
// 指名道姓走哪个 Provider
var order = await dispatcher.WaybillQueryAsync(
new ExpressRequest { CarrierCode = "SF", Provider = "Cainiao" },
new WaybillQueryRequest { WaybillNo = "SF1234567890" });
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Galosys.Foundation.Core (>= 26.8.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Galosys.Foundation.Integration.Express.Abstractions:
| Package | Downloads |
|---|---|
|
Galosys.Foundation.Express.Direct
Galosys.Foundation快速开发库 |
GitHub repositories
This package is not used by any popular GitHub repositories.