lihong557

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
 

WF运行时是WF程序的执行环境,必须将它驻留在CLR应用程序域中。

构造函数:

WorkflowRuntime ()

WorkflowRuntime (String)

使用配制文件初始化运行时,参数为自定义的节名称

WorkflowRuntime (WorkflowRuntimeSection)

使用自定义配制信息初始化运行时

    其实配置文件方式是读取配置文件中信息,然后生成WorkflowRuntimeSection类事例,然后使用第三个重载方法生成运行时实例。

配置文件的节点和节点属性都是跟WorkflowRuntimeSection属性值对应的。下面是一个配置文件例程:

<?xmlversion="1.0"encoding="utf-8" ?>

<configuration>

 <configSections>

    <sectionname="WorkflowRuntime"

             type="System.Workflow.Runtime.Configuration.WorkflowRuntimeSection,

             System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,

             PublicKeyToken=31bf3856ad364e35" />

 </configSections>

 <WorkflowRuntimeName="ConsoleHostingManaged">

    <CommonParameters>

      <!--向所有服务添加公共属性-->

      <addname="ConnectionString"

           value="Initial Catalog=WorkflowPersistence;

           Data Source=localhost"SQLEXPRESS;

           Integrated Security=SSPI;" />

    </CommonParameters>

    <Services>

      <!--添加核心服务-->

      <addtype="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService,

           System.Workflow.Runtime, Version=3.0.00000.0,

           Culture=neutral, PublicKeyToken=31bf3856ad364e35"

           UnloadOnIdle="true"LoadIntervalSeconds="5" />

    </Services>

 </WorkflowRuntime>

</configuration>

posted on 2008-01-14 11:24  抛物线  阅读(472)  评论(0)    收藏  举报