Bitzsoft.Integrations.ProjectManagement
1.0.0
See the version list below for details.
dotnet add package Bitzsoft.Integrations.ProjectManagement --version 1.0.0
NuGet\Install-Package Bitzsoft.Integrations.ProjectManagement -Version 1.0.0
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement" Version="1.0.0" />
<PackageVersion Include="Bitzsoft.Integrations.ProjectManagement" Version="1.0.0" />
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement" />
paket add Bitzsoft.Integrations.ProjectManagement --version 1.0.0
#r "nuget: Bitzsoft.Integrations.ProjectManagement, 1.0.0"
#:package Bitzsoft.Integrations.ProjectManagement@1.0.0
#addin nuget:?package=Bitzsoft.Integrations.ProjectManagement&version=1.0.0
#tool nuget:?package=Bitzsoft.Integrations.ProjectManagement&version=1.0.0
Bitzsoft.Integrations.ProjectManagement
项目管理抽象层 — 统一接口定义、基础模型与结果包装。
屏蔽 Asana、Teambition、JiraCloud、Monday、Trello、ONES、PingCode 等供应商差异,提供一致的项目创建/查询与任务创建、查询、更新、完成、列表查询 API。
功能特性
- 统一供应商接口
IProjectManagementService:8 个异步方法覆盖项目与任务全生命周期 - 统一结果包装:
PmResult携带成功标志与错误信息 - 统一异常
ProjectManagementException:封装供应商标识、错误码与请求 ID - 不可变模型设计:集合返回
List<T>,属性使用init保证只读
安装
dotnet add package Bitzsoft.Integrations.ProjectManagement
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement" Version="1.0.0" />
接口
IProjectManagementService
统一的项目管理供应商接口。
| 方法 | 返回类型 | 说明 |
|---|---|---|
ProviderName |
string |
供应商标识(如 Asana、Teambition) |
CreateProjectAsync |
Task<PmProject> |
创建项目,返回项目信息 |
ListProjectsAsync |
Task<List<PmProject>> |
查询项目列表 |
CreateTaskAsync |
Task<PmTask> |
创建任务,返回任务信息 |
GetTaskAsync |
Task<PmTask> |
查询单个任务 |
UpdateTaskAsync |
Task<PmResult> |
更新任务信息 |
CompleteTaskAsync |
Task<PmResult> |
完成任务 |
ListTasksAsync |
Task<List<PmTask>> |
分页查询任务列表 |
注意:JiraCloud 实现为只读,写操作(创建/更新/完成任务)将抛出
NotSupportedException。
核心模型
| 类 | 关键字段 | 说明 |
|---|---|---|
CreateProjectRequest |
Name、Description、DueDate |
创建项目请求 |
CreateTaskRequest |
ProjectId、Name、Description、AssigneeId、DueDate、Priority |
创建任务请求 |
UpdateTaskRequest |
TaskId、Name、Description、AssigneeId、DueDate、Priority |
更新任务请求 |
ListTasksRequest |
ProjectId、Status、AssigneeId、PageIndex、PageSize |
任务列表查询参数 |
PmProject |
ProjectId、Name、Description、Status、OwnerId、CreatedAt、DueDate |
项目信息 |
PmTask |
TaskId、ProjectId、Name、Description、Status、AssigneeId、DueDate、Priority、Tags |
任务信息 |
PmResult |
Success、ErrorMessage |
操作结果 |
ProjectManagementException |
— | 统一异常(继承 IntegrationException) |
枚举
| 枚举 | 说明 |
|---|---|
TaskStatus |
任务状态:Todo / InProgress / Completed / Cancelled |
TaskPriority |
任务优先级:Low / Medium / High |
ProjectStatus |
项目状态:Active / OnHold / Completed / Archived |
使用示例
抽象层本身只定义接口与模型,具体实现由各供应商包提供。以下示例假设已注册某个供应商实现:
public class TaskBoardService(IProjectManagementService pm)
{
public async Task<string> PlanTaskAsync(string projectId, string name, string assigneeId)
{
var task = await pm.CreateTaskAsync(new CreateTaskRequest
{
ProjectId = projectId,
Name = name,
AssigneeId = assigneeId,
DueDate = DateTimeOffset.UtcNow.AddDays(7),
Priority = TaskPriority.Medium
});
return task.TaskId;
}
public Task<PmResult> CloseTaskAsync(string taskId)
=> pm.CompleteTaskAsync(taskId);
}
多供应商解析
同一应用注册多个供应商时,通过 IIntegrationProviderResolver<IProjectManagementService> 按供应商 ID 解析:
var resolver = serviceProvider.GetRequiredService<IIntegrationProviderResolver<IProjectManagementService>>();
var asana = resolver.GetRequired("asana");
var task = await asana.CreateTaskAsync(request);
依赖
- Bitzsoft.Integrations.Core:公共基座(
IntegrationException、IIntegrationProviderResolver<T>)
相关包
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Bitzsoft.Integrations.Core (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
-
net5.0
- Bitzsoft.Integrations.Core (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Options (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.Core (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Bitzsoft.Integrations.ProjectManagement:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.ProjectManagement.Trello
Trello 项目管理实现 — API Key + Token query 参数鉴权 + HttpClient,实现 IProjectManagementService 统一接口,支持项目创建/列表与任务 CRUD/完成/列表 |
|
|
Bitzsoft.Integrations.ProjectManagement.Monday
monday.com 项目管理实现 — API Key Bearer 鉴权 + GraphQL,实现 IProjectManagementService 统一接口,支持项目创建/列表与任务 CRUD/完成/列表 |
|
|
Bitzsoft.Integrations.ProjectManagement.Ones
ONES 项目管理实现 — 用户 token 登录认证 Bearer 鉴权 + HttpClient,实现 IProjectManagementService 统一接口,支持项目创建/列表与任务 CRUD/完成/列表 |
|
|
Bitzsoft.Integrations.ProjectManagement.Asana
Asana 项目管理实现 — Personal Access Token Bearer 鉴权 + HttpClient,实现 IProjectManagementService 统一接口,支持项目创建/列表与任务 CRUD/完成/列表 |
|
|
Bitzsoft.Integrations.ProjectManagement.Teambition
Teambition(钉钉旗下)项目管理实现 — AppKey + AppSecret 换 access_token(query 注入)鉴权 + HttpClient,实现 IProjectManagementService 统一接口,支持项目创建/列表与任务 CRUD/完成/列表 |
GitHub repositories
This package is not used by any popular GitHub repositories.