ServiceDescriptionCollection クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


Imports System Imports System.Xml Imports System.Web.Services.Description Class MyServiceDescriptionCollection Public Shared Sub Main() Try ' Get ServiceDescription objects. Dim myServiceDescription1 As ServiceDescription = _ ServiceDescription.Read("DataTypes_VB.wsdl") Dim myServiceDescription2 As ServiceDescription = _ ServiceDescription.Read("MathService_VB.wsdl") ' Set the names of the ServiceDescriptions. myServiceDescription1.Name = "DataTypes" myServiceDescription2.Name = "MathService" ' Create a ServiceDescriptionCollection. Dim myServiceDescriptionCollection As _ New ServiceDescriptionCollection() ' Add the ServiceDescriptions to the collection. myServiceDescriptionCollection.Add(myServiceDescription1) myServiceDescriptionCollection.Add(myServiceDescription2) ' Display the elements of the collection using the Item property. Console.WriteLine("Elements in the collection: ") Dim i As Integer For i = 0 To myServiceDescriptionCollection.Count - 1 Console.WriteLine(myServiceDescriptionCollection(i).Name) Next i ' Construct an XML qualified name. Dim myXmlQualifiedName As New XmlQualifiedName( _ "MathServiceSoap", "http://tempuri2.org/") ' Get the Binding from the collection. Dim myBinding As Binding = _ myServiceDescriptionCollection.GetBinding(myXmlQualifiedName) Console.WriteLine("Binding found in collection with name: " & _ myBinding.ServiceDescription.Name) Catch e As Exception Console.WriteLine("The following exception was raised: {0}", _ e.Message.ToString()) End Try End Sub 'Main End Class 'MyServiceDescriptionCollection
using System; using System.Xml; using System.Web.Services.Description; class MyServiceDescriptionCollection { public static void Main() { try { // Get ServiceDescription objects. ServiceDescription myServiceDescription1 = ServiceDescription.Read("DataTypes_CS.wsdl"); ServiceDescription myServiceDescription2 = ServiceDescription.Read("MathService_CS.wsdl"); // Set the names of the ServiceDescriptions. myServiceDescription1.Name = "DataTypes"; myServiceDescription2.Name = "MathService"; // Create a ServiceDescriptionCollection. ServiceDescriptionCollection myServiceDescriptionCollection = new ServiceDescriptionCollection(); // Add the ServiceDescriptions to the collection. myServiceDescriptionCollection.Add(myServiceDescription1); myServiceDescriptionCollection.Add(myServiceDescription2); // Display the elements of the collection using the indexer. Console.WriteLine("Elements in the collection: "); for(int i = 0; i < myServiceDescriptionCollection.Count; i++) { Console.WriteLine(myServiceDescriptionCollection[i].Name); } // Construct an XML qualified name. XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/"); // Get the Binding from the collection. Binding myBinding = myServiceDescriptionCollection.GetBinding(myXmlQualifiedName); Console.WriteLine("Binding found in collection with name: " + myBinding.ServiceDescription.Name); } catch(Exception e) { Console.WriteLine("The following exception was raised: {0}", e.Message); } } }
#using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Xml; using namespace System::Web::Services::Description; int main() { try { // Get ServiceDescription objects. ServiceDescription^ myServiceDescription1 = ServiceDescription::Read( "DataTypes_cpp.wsdl" ); ServiceDescription^ myServiceDescription2 = ServiceDescription::Read( "MathService_cpp.wsdl" ); // Set the names of the ServiceDescriptions. myServiceDescription1->Name = "DataTypes"; myServiceDescription2->Name = "MathService"; // Create a ServiceDescriptionCollection. ServiceDescriptionCollection^ myServiceDescriptionCollection = gcnew ServiceDescriptionCollection; // Add the ServiceDescriptions to the collection. myServiceDescriptionCollection->Add( myServiceDescription1 ); myServiceDescriptionCollection->Add( myServiceDescription2 ); // Display the elements of the collection using the Item property. Console::WriteLine( "Elements in the collection: " ); for ( int i = 0; i < myServiceDescriptionCollection->Count; i++ ) Console::WriteLine( myServiceDescriptionCollection[ i ]->Name ); // Construct an XML qualified name. XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "MathServiceSoap","http://tempuri2.org/" ); // Get the Binding from the collection. Binding^ myBinding = myServiceDescriptionCollection->GetBinding( myXmlQualifiedName ); Console::WriteLine( "Binding found in collection with name: {0}", myBinding->ServiceDescription->Name ); } catch ( Exception^ e ) { Console::WriteLine( "The following exception was raised: {0}", e->Message ); } }
import System.*; import System.Xml.*; import System.Web.Services.Description.*; class MyServiceDescriptionCollection { public static void main(String[] args) { try { // Get ServiceDescription objects. ServiceDescription myServiceDescription1 = ServiceDescription. Read("DataTypes_JSL.wsdl"); ServiceDescription myServiceDescription2 = ServiceDescription. Read("MathService_JSL.wsdl"); // Set the names of the ServiceDescriptions. myServiceDescription1.set_Name("DataTypes"); myServiceDescription2.set_Name("MathService"); // Create a ServiceDescriptionCollection. ServiceDescriptionCollection myServiceDescriptionCollection = new ServiceDescriptionCollection(); // Add the ServiceDescriptions to the collection. myServiceDescriptionCollection.Add(myServiceDescription1); myServiceDescriptionCollection.Add(myServiceDescription2); // Display the elements of the collection using the indexer. Console.WriteLine("Elements in the collection: "); for (int i = 0;i < myServiceDescriptionCollection.get_Count();i++) { Console.WriteLine(myServiceDescriptionCollection.get_Item(i). get_Name()); } // Construct an XML qualified name. XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/"); // Get the Binding from the collection. Binding myBinding = myServiceDescriptionCollection. GetBinding(myXmlQualifiedName); Console.WriteLine("Binding found in collection with name: " + myBinding.get_ServiceDescription().get_Name()); } catch (System.Exception e) { Console.WriteLine("The following exception was raised: {0}" , e.get_Message()); } } //main } //MyServiceDescriptionCollection

System.Collections.CollectionBase
System.Web.Services.Description.ServiceDescriptionBaseCollection
System.Web.Services.Description.ServiceDescriptionCollection


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ServiceDescriptionCollection コンストラクタ
アセンブリ: System.Web.Services (system.web.services.dll 内)


' Create the object of 'ServiceDescriptionCollection' class. Dim myCollection As New ServiceDescriptionCollection() ' Add 'ServiceDescription' objects. myCollection.Add(myServiceDescription1) myCollection.Add(myServiceDescription2)
// Create the object of 'ServiceDescriptionCollection' class. ServiceDescriptionCollection myCollection = new ServiceDescriptionCollection(); // Add 'ServiceDescription' objects. myCollection.Add(myServiceDescription1); myCollection.Add(myServiceDescription2);
// Create a ServiceDescriptionCollection. ServiceDescriptionCollection^ myCollection = gcnew ServiceDescriptionCollection; // Add ServiceDescriptions to the collection. myCollection->Add( myServiceDescription1 ); myCollection->Add( myServiceDescription2 );

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ServiceDescriptionCollection プロパティ

名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。 ( CollectionBase から継承されます。) |
![]() | Item | オーバーロードされます。 渡されたパラメータによって指定された ServiceDescription インスタンスを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。 ( CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。 ( CollectionBase から継承されます。) |

ServiceDescriptionCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | Add | 指定した ServiceDescription を ServiceDescriptionCollection の末尾に追加します。 |
![]() | Clear | CollectionBase インスタンスからすべてのオブジェクトを削除します。このメソッドはオーバーライドできません。 ( CollectionBase から継承されます。) |
![]() | Contains | 指定した ServiceDescription がコレクションのメンバかどうかを示す値を返します。 |
![]() | CopyTo | ServiceDescription 型の 1 次元配列に、その配列内の指定した 0 から始まるインデックスを開始位置として ServiceDescriptionCollection 全体をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetBinding | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Binding を返します。 |
![]() | GetEnumerator | CollectionBase インスタンスを反復処理する列挙子を返します。 ( CollectionBase から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetMessage | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Message を返します。 |
![]() | GetPortType | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の PortType を返します。 |
![]() | GetService | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Service を返します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IndexOf | 指定した ServiceDescription を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックス番号を返します。 |
![]() | Insert | 指定した 0 から始まるインデックス番号にある ServiceDescriptionCollection に、指定した ServiceDescription インスタンスを追加します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | Remove | コレクションから、最初に出現する指定した ServiceDescription を削除します。 |
![]() | RemoveAt | CollectionBase インスタンスの指定したインデックスにある要素を削除します。このメソッドはオーバーライドできません。 ( CollectionBase から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
![]() | OnClear | CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnClearComplete | CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnInsert | CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnInsertComplete | CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnRemove | CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnRemoveComplete | CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnSet | CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnSetComplete | CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnValidate | 値を検証するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |

ServiceDescriptionCollection メンバ
ServiceDescription クラスのインスタンスのコレクションを表します。このクラスは継承できません。
ServiceDescriptionCollection データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。(CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。(CollectionBase から継承されます。) |
![]() | Item | オーバーロードされます。 渡されたパラメータによって指定された ServiceDescription インスタンスを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。(CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。(CollectionBase から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Add | 指定した ServiceDescription を ServiceDescriptionCollection の末尾に追加します。 |
![]() | Clear | CollectionBase インスタンスからすべてのオブジェクトを削除します。このメソッドはオーバーライドできません。 (CollectionBase から継承されます。) |
![]() | Contains | 指定した ServiceDescription がコレクションのメンバかどうかを示す値を返します。 |
![]() | CopyTo | ServiceDescription 型の 1 次元配列に、その配列内の指定した 0 から始まるインデックスを開始位置として ServiceDescriptionCollection 全体をコピーします。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetBinding | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Binding を返します。 |
![]() | GetEnumerator | CollectionBase インスタンスを反復処理する列挙子を返します。 (CollectionBase から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetMessage | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Message を返します。 |
![]() | GetPortType | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の PortType を返します。 |
![]() | GetService | ServiceDescriptionCollection を検索し、そのコレクションに格納されている ServiceDescription インスタンスのいずれかのメンバである、指定した名前の Service を返します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IndexOf | 指定した ServiceDescription を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックス番号を返します。 |
![]() | Insert | 指定した 0 から始まるインデックス番号にある ServiceDescriptionCollection に、指定した ServiceDescription インスタンスを追加します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | Remove | コレクションから、最初に出現する指定した ServiceDescription を削除します。 |
![]() | RemoveAt | CollectionBase インスタンスの指定したインデックスにある要素を削除します。このメソッドはオーバーライドできません。 (CollectionBase から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() | OnClear | CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnClearComplete | CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnInsert | CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnInsertComplete | CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnRemove | CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnRemoveComplete | CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnSet | CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnSetComplete | CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnValidate | 値を検証するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |

- ServiceDescriptionCollectionのページへのリンク