18 课 AI 智能体入门教程:1 小时跑通你的第一个智能体
2026/10/11 4:46:43
在开发工作流时,自定义活动能够极大地扩展系统的功能。本文将详细介绍如何创建一个自定义活动,用于在 SharePoint 的日历列表中创建新事件。
首先,模板会生成一个活动设计器。右键单击该文件,选择“查看代码”,添加以下命名空间:
using Microsoft.SharePoint; using Microsoft.SharePoint.Workflow; using Microsoft.SharePoint.WorkflowActions;将模板创建的CreateEvent类的父类从SequenceActivity更改为Activity。CreateEvent.cs类的初始实现如下:
using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Collections; using System.Linq; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Serialization; using System.Workflow.ComponentModel; using