言語

Task コンストラクター

定義

Task クラスの新しいインスタンスを初期化します。

protected:
 Task();
protected Task();
Protected Sub New ()

以下のコードサンプルは、コンストラクタを使って新しい BulkInsertTask を作成します。

BulkInsertTask myTask = new BulkInsertTask();  
Dim myTask As BulkInsertTask =  New BulkInsertTask()  

注釈

Taskから継承されたタスクについては、各タスクの例セクションにあるコード例でタスク構造体の呼び出し方法が示されています。 しかし、ほとんどの場合、タスクはパッケージのメンバーとして作成します。 課題の鋳造についての詳細は、 Addのコメントを参照してください。

Package pkg = new Package();  
Executable exec1 = pkg.Executables.Add("STOCK:BulkInsertTask");  
TaskHost th = exec1 as TaskHost;  
// You can cast the InnerObject of the TaskHost  
// to the specific class.  
// For the code samples, the task properties are accessed using  
// the Properties of the TaskHost.  
//BulkInsertTask myTask = th.InnerObject as BulkInsertTask;  
Dim pkg As Package =  New Package()   
Dim exec1 As Executable =  pkg.Executables.Add("STOCK:BulkInsertTask")   
Dim th As TaskHost =  exec1 as TaskHost   
' You can cast the InnerObject of the TaskHost  
' to the specific class.  
' For the code samples, the task properties are accessed using  
' the Properties of the TaskHost.  
'BulkInsertTask myTask = th.InnerObject as BulkInsertTask;  

BulkInsertTaskの性質と方法はTaskHost変数thを用いて利用可能です。

適用対象