PipelineComponentInfos.Item[Object] 속성

정의

컬렉션에서 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

PipelineComponentInfo 개체입니다.

예제

다음 코드 예제에서는 두 가지 메서드를 사용하여 컬렉션에서 항목을 검색합니다. 첫 번째 메서드는 구문을 사용하여 pInfos[…] 컬렉션의 첫 번째 위치에 있는 전체 개체를 검색하고 개체에 pInfo 배치합니다. 이제 개체에서 평소와 같이 모든 속성을 검색할 pInfo 수 있습니다. 두 번째 메서드는 이름을 인덱서로 사용하여 컬렉션의 "merge" 개체에서 특정 속성인 설명을 검색하는 방법을 보여 줍니다.

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되는 경우 이 속성은 예외를 throw합니다. C#에서 이 속성은 클래스의 인덱서 PipelineComponentInfos 입니다.

적용 대상