PrecedenceConstraint.ConstrainedExecutable 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
제약 조건이 지정된 컨테이너의 이름을 가져옵니다. 이 속성은 읽기 전용입니다.
public:
property Microsoft::SqlServer::Dts::Runtime::Executable ^ ConstrainedExecutable { Microsoft::SqlServer::Dts::Runtime::Executable ^ get(); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PCToExecDesc")]
public Microsoft.SqlServer.Dts.Runtime.Executable ConstrainedExecutable { get; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PCToExecDesc")>]
member this.ConstrainedExecutable : Microsoft.SqlServer.Dts.Runtime.Executable
Public ReadOnly Property ConstrainedExecutable As Executable
속성 값
Executable 개체입니다.
- 특성
예제
다음 코드 예제에서는 세 개의 작업을 만들고 우선 순위 제약 조건을 사용하여 연결합니다. 그런 다음, 샘플은 패키지 컬렉션의 제약 조건을 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
만들기 이름
설명
평가 작업 제약 조건
true True를 평가합니다.
식
ID {BA20A288-545D-4E48-864A-E6AF6C3B9AEE}
LogicalAnd True
이름 {BA20A288-545D-4E48-864A-E6AF6C3B9AEE}
선행 실행 파일 Microsoft.SqlServer.Dts.Runtime.TaskHost
값 성공
-----------------------------------
제한된 컨테이너 Microsoft.SqlServer.Dts.Runtime.TaskHost
만들기 이름
설명
평가 작업 제약 조건
true True를 평가합니다.
식
ID {E8DBC95E-AF27-45D7-B961-17E908CC4530}
LogicalAnd True
이름 {E8DBC95E-AF27-45D7-B961-17E908CC4530}
선행 실행 파일 Microsoft.SqlServer.Dts.Runtime.TaskHost
값 성공
-----------------------------------