Bitzsoft.Integrations.ProjectManagement 1.0.1

dotnet add package Bitzsoft.Integrations.ProjectManagement --version 1.0.1
                    
NuGet\Install-Package Bitzsoft.Integrations.ProjectManagement -Version 1.0.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="Bitzsoft.Integrations.ProjectManagement" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.ProjectManagement" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement" />
                    
Project file
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 Bitzsoft.Integrations.ProjectManagement --version 1.0.1
                    
#r "nuget: Bitzsoft.Integrations.ProjectManagement, 1.0.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 Bitzsoft.Integrations.ProjectManagement@1.0.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=Bitzsoft.Integrations.ProjectManagement&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Bitzsoft.Integrations.ProjectManagement&version=1.0.1
                    
Install as a Cake Tool

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 供应商标识(如 AsanaTeambition
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 NameDescriptionDueDate 创建项目请求
CreateTaskRequest ProjectIdNameDescriptionAssigneeIdDueDatePriority 创建任务请求
UpdateTaskRequest TaskIdNameDescriptionAssigneeIdDueDatePriority 更新任务请求
ListTasksRequest ProjectIdStatusAssigneeIdPageIndexPageSize 任务列表查询参数
PmProject ProjectIdNameDescriptionStatusOwnerIdCreatedAtDueDate 项目信息
PmTask TaskIdProjectIdNameDescriptionStatusAssigneeIdDueDatePriorityTags 任务信息
PmResult SuccessErrorMessage 操作结果
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.ProjectManagement
Asana Bitzsoft.Integrations.ProjectManagement.Asana
Teambition Bitzsoft.Integrations.ProjectManagement.Teambition
JiraCloud(只读) Bitzsoft.Integrations.ProjectManagement.JiraCloud
Monday Bitzsoft.Integrations.ProjectManagement.Monday
Trello Bitzsoft.Integrations.ProjectManagement.Trello
ONES Bitzsoft.Integrations.ProjectManagement.Ones
PingCode Bitzsoft.Integrations.ProjectManagement.PingCode
聚合包 Bitzsoft.Integrations.ProjectManagement.All
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
1.0.1 310 8/3/2026
1.0.0 316 8/2/2026