将Workflow dll加载为工作流服务

时间:2014-11-25 12:13:28

标签: workflow workflow-foundation-4 workflow-activity workflowservice

我有接收回复活动的工作流服务xamlx

//Current Setup
string fullPath1 = @"C:\Projects\Learning\Workflows\Approval1.xamlx";
WorkflowService service1 = XamlServices.Load(fullPath1) as WorkflowService;
WorkflowServiceHost host1 = new WorkflowServiceHost(service1);

CompileWorkflow(service1);

host1.Open();


static void CompileWorkflow(WorkflowService workflowService)
{
TextExpressionCompilerSettings settings = new TextExpressionCompilerSettings
{
.........}}  

//想要加载dll而不是xamlx

string fullPath1 = @"C:\Projects\Learning\Workflows\bin\Approval1.dll"; // Not XAMLX
WorkflowService service1 = LoadWorkflowService(fullPath1);
WorkflowServiceHost host1 = new WorkflowServiceHost(service1);

host1.Open();

//有关如何实现LoadWorkflowService()的任何想法吗?

0 个答案:

没有答案