次の方法で共有


WorkflowRuntime の作成

Windows Workflow Foundation を初期化する既定の方法は、次に示すように WorkflowRuntime クラスを使用する方法です。

Imports System
Imports System.Threading
Imports System.Workflow.Runtime
Imports System.Workflow.Runtime.Hosting

Class Program

    Shared Sub Main()
        Using workflowRuntime As WorkflowRuntime = New WorkflowRuntime()
        End Using
    End Sub
End Class
using System;
using System.Threading;
using System.Workflow.Runtime;
using System.Workflow.Runtime.Hosting;

class Program
{
    static void Main(string[] args)
    {
        using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
        {
        }
    }
}

using ステートメント本体で、WorkflowRuntime オブジェクトが初期化され、使用できる状態になります。この時点で、イベント ハンドラを作成して、ランタイム エンジンによって発行されるイベントを処理し、ランタイム エンジンによって使用される任意の基本サービスを取得して構成し、ワークフロー インスタンスを作成して開始します。Windows Workflow Foundation サービスの詳細については、「Windows Workflow Foundation サービス」を参照してください。

関連項目

概念

WorkflowRuntime イベントの処理
ワークフローの実行

Copyright © 2007 by Microsoft Corporation. All rights reserved.