DtsContainer.SuspendRequired 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
작업이 중단점에 도달했을 때 중단해야 하는지 알려주는 불리언을 받거나 설정합니다. 이 값은 실행 엔진이 작업과 컨테이너에 대해 브레이크포인트가 발생했을 때 설정합니다.
public:
property bool SuspendRequired { bool get(); void set(bool value); };
public bool SuspendRequired { get; set; }
member this.SuspendRequired : bool with get, set
Public Property SuspendRequired As Boolean
속성 값
작업이 브레이크포인트에 도달하면 정지되면 true입니다.
구현
예제
다음 코드 예시는 커스텀 작업에 대한 오버라이드 SuspendRequired 속성의 예입니다.
public bool SuspendRequired
{
get
{
// m_suspendRequired is an Private integer declared in the custom task.
return m_suspendRequired != 0;
}
set
{
// This lock is also taken by Suspend(). Since it is possible for the package to be
// suspended and resumed in quick succession, this property "put" might happen
// before the actual Suspend() call. Without the lock, the Suspend() might reset
// the canExecute event after we set it to abort the suspension.
lock (this)
{
Interlocked.Exchange(ref m_suspendRequired, value ? 1 : 0);
if (!value)
ResumeExecution();
}
}
Public ReadOnly Property SuspendRequired() As Boolean
Get
' m_suspendRequired is an Private integer declared in the custom task.
Return m_suspendRequired <> 0
End Get
Public WriteOnly Property SuspendRequired() As Boolean
Set (ByVal Value As Boolean)
' This lock is also taken by Suspend(). Since it is possible for the package to be
' suspended and resumed in quick succession, this property "put" might happen
' before the actual Suspend() call. Without the lock, the Suspend() might reset
' the canExecute event after it is set to abort the suspension.
lock (Me)
{
Interlocked.Exchange(m_suspendRequired, value ? 1 : 0)
If Not value Then
ResumeExecution()
End If
}
End Set
End Property
설명
속성은 코드로 설정되어 있지 않습니다. 이 기능은 작업과 컨테이너에 대해 브레이크포인트가 발생했을 때 런타임에 의해 설정됩니다.
하지만 멀티스레드 커스텀 작업을 작성할 때는 이 메서드에 대해 코드를 제공해야 합니다. 이 메서드는 클래스에서 IDTSSuspend 물려받은 것으로, 브레이크포인트를 노출하는 작업입니다. 만약 작업이 단일 스레드(single-threaded)라면, 즉 커스텀 작업에서 구현 Execute 된 것이 새 스레드를 시작하지 않는다면, 이 인터페이스를 구현할 필요가 없습니다. 맞춤형 작업 작성에 대한 자세한 내용은 "맞춤형 작업 개발"을 참조하세요.