次の方法で共有


PrecedenceConstraint.EvalOp プロパティ

定義

優先順位制約により使用される評価演算を取得します。値の設定も可能です。

public:
 property Microsoft::SqlServer::Dts::Runtime::DTSPrecedenceEvalOp EvalOp { Microsoft::SqlServer::Dts::Runtime::DTSPrecedenceEvalOp get(); void set(Microsoft::SqlServer::Dts::Runtime::DTSPrecedenceEvalOp value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PCEvalOpDesc")]
public Microsoft.SqlServer.Dts.Runtime.DTSPrecedenceEvalOp EvalOp { get; set; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PCEvalOpDesc")>]
member this.EvalOp : Microsoft.SqlServer.Dts.Runtime.DTSPrecedenceEvalOp with get, set
Public Property EvalOp As DTSPrecedenceEvalOp

プロパティ値

DTSPrecedenceEvalOp

DTSPrecedenceEvalOp 列挙体の値。

属性

次のコード例では、3 つのタスクを作成し、優先順位制約を使用してそれらのタスクを接続します。 次に、パッケージの PrecedenceConstraints コレクション内の制約に対して繰り返し処理を実行し、各制約に関する情報を出力します。

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace PrecedenceConst  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            // Add a File System task.  
            Executable eFileTask1 = pkg.Executables.Add("STOCK:FileSystemTask");  
            TaskHost thFileTask1 = eFileTask1 as TaskHost;  

            // Add a second File System task.  
            Executable eFileTask2 = pkg.Executables.Add("STOCK:FileSystemTask");  
            TaskHost thFileTask2 = eFileTask2 as TaskHost;  

            // Add a Bulk Insert task.  
            Executable eBulkInsert = pkg.Executables.Add("STOCK:BulkInsertTask");  
            TaskHost thBulkInsert = eBulkInsert as TaskHost;  

            // Add a precedence contraint between eFileTask1 and eFileTask2.  
            // Set the constraint to be that eFileTask2 cannot run   
            // until eFileTask1 completes.  
            PrecedenceConstraint pcFileTasks = pkg.PrecedenceConstraints.Add(eFileTask1, eFileTask2);  

            // Add another precedence contraint. Add it between eFileTask2 and BulkInsert.  
            // Again, set the constraint to be that BulkInsert cannot run   
            // until eFileTask2 completes.  
            PrecedenceConstraint pcFiletoBulk = pkg.PrecedenceConstraints.Add(eFileTask2, eBulkInsert);  

            // Obtain the precedence constraint collection, and display properties.  
            // Some properties are read/write and have not been set.  
            PrecedenceConstraints pConsts = pkg.PrecedenceConstraints;  
            foreach (PrecedenceConstraint pc in pConsts)  
            {  
                Console.WriteLine("Constrained container  {0}", pc.ConstrainedExecutable);  
                Console.WriteLine("Creation Name          {0}", pc.CreationName);  
                Console.WriteLine("Description            {0}", pc.Description);  
                Console.WriteLine("Evaluation operation   {0}", pc.EvalOp);  
                Console.WriteLine("Evaluates true         {0}", pc.EvaluatesTrue);  
                Console.WriteLine("Expression             {0}", pc.Expression);  
                Console.WriteLine("ID                     {0}", pc.ID);  
                Console.WriteLine("LogicalAnd             {0}", pc.LogicalAnd);  
                Console.WriteLine("Name                   {0}", pc.Name);  
                Console.WriteLine("Precedence Executable  {0}", pc.PrecedenceExecutable);  
                Console.WriteLine("Value                  {0}", pc.Value);  
                Console.WriteLine("-----------------------------------");  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace PrecedenceConst  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            ' Add a File System task.  
            Dim eFileTask1 As Executable =  pkg.Executables.Add("STOCK:FileSystemTask")   
            Dim thFileTask1 As TaskHost =  eFileTask1 as TaskHost   

            ' Add a second File System task.  
            Dim eFileTask2 As Executable =  pkg.Executables.Add("STOCK:FileSystemTask")   
            Dim thFileTask2 As TaskHost =  eFileTask2 as TaskHost   

            ' Add a Bulk Insert task.  
            Dim eBulkInsert As Executable =  pkg.Executables.Add("STOCK:BulkInsertTask")   
            Dim thBulkInsert As TaskHost =  eBulkInsert as TaskHost   

            ' Add a precedence contraint between eFileTask1 and eFileTask2.  
            ' Set the constraint to be that eFileTask2 cannot run   
            ' until eFileTask1 completes.  
            Dim pcFileTasks As PrecedenceConstraint =  pkg.PrecedenceConstraints.Add(eFileTask1,eFileTask2)   

            ' Add another precedence contraint. Add it between eFileTask2 and BulkInsert.  
            ' Again, set the constraint to be that BulkInsert cannot run   
            ' until eFileTask2 completes.  
            Dim pcFiletoBulk As PrecedenceConstraint =  pkg.PrecedenceConstraints.Add(eFileTask2,eBulkInsert)   

            ' Obtain the precedence constraint collection, and display properties.  
            ' Some properties are read/write and have not been set.  
            Dim pConsts As PrecedenceConstraints =  pkg.PrecedenceConstraints   
            Dim pc As PrecedenceConstraint  
            For Each pc In pConsts  
                Console.WriteLine("Constrained container  {0}", pc.ConstrainedExecutable)  
                Console.WriteLine("Creation Name          {0}", pc.CreationName)  
                Console.WriteLine("Description            {0}", pc.Description)  
                Console.WriteLine("Evaluation operation   {0}", pc.EvalOp)  
                Console.WriteLine("Evaluates true         {0}", pc.EvaluatesTrue)  
                Console.WriteLine("Expression             {0}", pc.Expression)  
                Console.WriteLine("ID                     {0}", pc.ID)  
                Console.WriteLine("LogicalAnd             {0}", pc.LogicalAnd)  
                Console.WriteLine("Name                   {0}", pc.Name)  
                Console.WriteLine("Precedence Executable  {0}", pc.PrecedenceExecutable)  
                Console.WriteLine("Value                  {0}", pc.Value)  
                Console.WriteLine("-----------------------------------")  
            Next  
        End Sub  
    End Class  
End Namespace  

サンプル出力:

制約付きコンテナー Microsoft.SqlServer.Dts.Runtime.TaskHost

Creation Name

説明

評価操作の制約

True を評価します。

Expression

ID {BA20A288-545D-4E48-864A-E6AF6C3B9AEE}

LogicalAnd True

名前 {BA20A288-545D-4E48-864A-E6AF6C3B9AEE}

優先順位実行可能ファイル Microsoft.SqlServer.Dts.Runtime.TaskHost

値の成功

-----------------------------------

制約付きコンテナー Microsoft.SqlServer.Dts.Runtime.TaskHost

Creation Name

説明

評価操作の制約

True を評価します。

Expression

ID {E8DBC95E-AF27-45D7-B961-17E908CC4530}

LogicalAnd True

名前 {E8DBC95E-AF27-45D7-B961-17E908CC4530}

優先順位実行可能ファイル Microsoft.SqlServer.Dts.Runtime.TaskHost

値の成功

-----------------------------------

注釈

列挙体の値

優先順位制約は、優先実行可能オブジェクトと制約付きの実行可能オブジェクトを連結します。 優先実行可能オブジェクトは制約付きの実行可能オブジェクトの前に実行され、優先実行可能オブジェクトの実行結果により、制約付きの実行可能オブジェクトを実行するかどうかが決まる場合があります。 優先実行可能オブジェクトの実行結果が制約付きの実行可能オブジェクトの実行を決定するかどうかは、このプロパティの設定に依存します。

適用対象