Returns the collection of PrecedenceConstraint objects. This field is read-only.
네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
구문
‘선언
Public ReadOnly Property PrecedenceConstraints As PrecedenceConstraints
public PrecedenceConstraints PrecedenceConstraints { get; }
public:
virtual property PrecedenceConstraints^ PrecedenceConstraints {
PrecedenceConstraints^ get () sealed;
}
/** @property */
public final PrecedenceConstraints get_PrecedenceConstraints ()
public final function get PrecedenceConstraints () : PrecedenceConstraints
속성 값
A PrecedenceConstraints collection that contains PrecedenceConstraint objects.
주의
Returns the collection of PrecedenceConstraint objects that contain information about conditions that must occur before a step can be released for execution. For more information about precedence constraints, see 선행 제약 조건.
예
The following code example adds two tasks to the package, and places a precedence constraing between them. It then counts the number of constraints in the package collection.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
namespace DataFlow_Conceptual
{
class Program
{
static void Main(string[] args)
{
Package p = new Package();
// Add a File System task.
Executable eFileTask1 = p.Executables.Add("STOCK:FileSystemTask");
TaskHost thFileHost1 = eFileTask1 as TaskHost;
// Add a second File System task.
Executable eFileTask2 = p.Executables.Add("STOCK:FileSystemTask");
TaskHost thFileHost2 = eFileTask2 as TaskHost;
// Put a precedence constraint between the tasks.
// Set the constraint to be that thFileTask2 cannot run
// unless thFileTask1 completes.
PrecedenceConstraint pcFileTasks = p.PrecedenceConstraints.Add((Executable)thFileHost1, (Executable) thFileHost2);
pcFileTasks.Value = DTSExecResult.Completion;
// Return and show the count of precedence constraints in the package.
PrecedenceConstraints pCons = p.PrecedenceConstraints;
Console.WriteLine("Precedence constraints in package = {0}", pCons.Count);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Package_API
Class Program
Shared Sub Main(ByVal args() As String)
Dim app As Application = New Application()
Dim pkg As Package = New Package()
pkg = app.LoadPackage("C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx", Nothing)
' Show the package type
Console.WriteLine("The package type is {0}", pkg.PackageType)
End Sub
End Class
End Namespace
Sample Output:
Precedence constraints in package = 1
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace