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 オブジェクト。
例
以下のコード例は、コレクションからアイテムを取得するために2つの方法を用います。 最初の方法は pInfos[…] 構文を用いて、コレクションの最初の位置にあるオブジェクト全体を取得し、 pInfo オブジェクトに配置します。 通常通り pInfo オブジェクトからすべてのプロパティを取得することができます。 2つ目の方法は、コレクション内の「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を返すと、この性質は例外を投げ出します。 C#では、この性質が PipelineComponentInfos クラスのインデクサとなります