PipelineComponentInfos.Item[Object] 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에서 객체를 PipelineComponentInfo 반환합니다.
public:
property Microsoft::SqlServer::Dts::Runtime::PipelineComponentInfo ^ default[System::Object ^] { Microsoft::SqlServer::Dts::Runtime::PipelineComponentInfo ^ get(System::Object ^ index); };
public Microsoft.SqlServer.Dts.Runtime.PipelineComponentInfo this[object index] { get; }
member this.Item(obj) : Microsoft.SqlServer.Dts.Runtime.PipelineComponentInfo
Default Public ReadOnly Property Item(index As Object) As PipelineComponentInfo
매개 변수
- index
- Object
컬렉션에서 찾을 항목의 이름, ID, 설명 또는 색인.
속성 값
PipelineComponentInfo 개체입니다.
예제
다음 코드 예시는 두 가지 방법으로 컬렉션에서 항목을 검색합니다. 첫 번째 방법은 구문을 사용하여 pInfos[…] 컬렉션의 첫 위치에 있는 전체 객체를 검색하여 객체에 pInfo 배치합니다. 이제 평소처럼 객체에서 pInfo 모든 속성을 가져올 수 있습니다. 두 번째 방법은 이름을 인덱서로 사용하여 컬렉션 내 "merge" 객체에서 특정 속성인 description을 가져오는 방법을 보여줍니다.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace TaskInfos_Item
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
PipelineComponentInfos pInfos = app.PipelineComponentInfos;
//Using the Item method syntax of [x], obtain the description
// of the Merge entry.
PipelineComponentInfo pInfo = pInfos["Merge"];
String nameOfFirstItem = pInfos["Merge"].Description;
Console.WriteLine("Description of Merge entry: {0}", nameOfFirstItem);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace TaskInfos_Item
Class Program
Shared Sub Main(ByVal args() As String)
Dim app As Application = New Application()
Dim pInfos As PipelineComponentInfos = app.PipelineComponentInfos
'Using the Item method syntax of [x], obtain the description
' of the Merge entry.
Dim pInfo As PipelineComponentInfo = pInfos("Merge")
Dim nameOfFirstItem As String = pInfos("Merge").Description
Console.WriteLine("Description of Merge entry: {0}", nameOfFirstItem)
End Sub
End Class
End Namespace
샘플 출력:
병합 항목 설명: 병합 변환
설명
메서드 호출 Contains 이 반환 true되면 구문 PipelineComponentInfos[index]를 사용하여 컬렉션 내 지정된 요소에 접근할 수 있습니다. 하지만 메서드가 Contains 를 반환 false하면 이 속성은 예외를 던집니다. C#에서 이 속성은 클래스의 PipelineComponentInfos 인덱서입니다