PipelineComponent.BufferManager Property
Gets the IDTSBufferManager90 of the pipeline component. This property is not CLS-compliant.
네임스페이스: Microsoft.SqlServer.Dts.Pipeline
어셈블리: Microsoft.SqlServer.PipelineHost (in microsoft.sqlserver.pipelinehost.dll)
구문
‘선언
<CLSCompliantAttribute(False)> _
Public ReadOnly Property BufferManager As IDTSBufferManager90
[CLSCompliantAttribute(false)]
public IDTSBufferManager90 BufferManager { get; }
[CLSCompliantAttribute(false)]
public:
property IDTSBufferManager90^ BufferManager {
IDTSBufferManager90^ get ();
}
/** @property */
public IDTSBufferManager90 get_BufferManager ()
public function get BufferManager () : IDTSBufferManager90
속성 값
The IDTSBufferManager90 object.
주의
The BufferManager is a read only, execution-time property that is first available to components in the PreExecute method.
The FindColumnByLineageID method is used to locate a component's columns in the IDTSInputColumnCollection90 or IDTSOutputColumnCollection90 of the component, in the PipelineBuffer. This is necessary because the number of columns contained in the PipelineBuffer may exceed the number of columns expected by the component.
The BufferManager is also used to create new IDTSBuffer90 objects using the CreateBuffer, CreateFlatBuffer, and CreateVirtualBuffer methods. However, these methods are not supported from managed code, and should only be used when writing native C++ components.
예
The following code example shows how to use the BufferManager property to locate the columns in a PipelineBuffer row.
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace Microsoft.Samples.SqlServer.Dts
{
public class SampleComponent : PipelineComponent
{
public override void ProcessInput( int InputID, PipelineBuffer buffer )
{
IDTSInput90 i = ComponentMetaData.InputCollection.GetObjectByID( InputID );
foreach( IDTSInputColumn90 col in i.InputColumnCollection)
{
int colIndex = BufferManager.FindColumnByLineageID(i.Buffer, col.LineageID);
BufferColumn bc =buffer.GetColumnInfo(colIndex);
}
}
}
}
Imports System
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Namespace Microsoft.Samples.SqlServer.Dts
Public Class SampleComponent
Inherits PipelineComponent
Public Overrides Sub ProcessInput(ByVal InputID As Integer, ByVal buffer As PipelineBuffer)
Dim i As IDTSInput90 = ComponentMetaData.InputCollection.GetObjectByID(InputID)
For Each col As IDTSInputColumn90 In i.InputColumnCollection
Dim colIndex As Integer = BufferManager.FindColumnByLineageID(i.Buffer, col.LineageID)
Dim bc As BufferColumn = buffer.GetColumnInfo(colIndex)
Next
End Sub
End Class
End Namespace
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
PipelineComponent Class
PipelineComponent Members
Microsoft.SqlServer.Dts.Pipeline Namespace