Workflow开发与婚礼流程模拟:从基础到高级应用
1. WorkflowServiceHost相关操作
在Workflow开发中,有一系列重要的操作和注意事项。首先是ApplicationInterface的实现,代码如下:
using System; using System.IO; using System.Windows.Controls; using System.Activities; namespace LeadResponse { public static class ApplicationInterface { public static FollowUpLead _app { get; set; } public static void AddAssignment(LeadGenerator.Assignment a) { if (_app != null) _app.lstLeads.Dispatcher.BeginInvoke (new Action(() => _app.AddAssignment(a))); } public static void UpdateAssignment(LeadGenerator.Assignment a) { if (_app != null) _app.lstLeads