ServiceDescriptionCollection クラス

定義

ServiceDescription クラスのインスタンスのコレクションを表します。 このクラスは継承できません。

public ref class ServiceDescriptionCollection sealed : System::Web::Services::Description::ServiceDescriptionBaseCollection
public sealed class ServiceDescriptionCollection : System.Web.Services.Description.ServiceDescriptionBaseCollection
type ServiceDescriptionCollection = class
    inherit ServiceDescriptionBaseCollection
Public NotInheritable Class ServiceDescriptionCollection
Inherits ServiceDescriptionBaseCollection
継承

#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 );
   }
}
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);
      }
   }
}
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
End Class

コンストラクター

ServiceDescriptionCollection()

ServiceDescriptionCollection クラスの新しいインスタンスを初期化します。

プロパティ

Capacity

CollectionBase に格納できる要素の数を取得または設定します。

(継承元 CollectionBase)
Count

CollectionBase インスタンスに含まれる要素の数を取得します。 このプロパティはオーバーライドできません。

(継承元 CollectionBase)
InnerList

ArrayList インスタンス内の要素のリストを格納する CollectionBase を取得します。

(継承元 CollectionBase)
Item[Int32]

指定の 0 から始まるインデックス番号に対応する ServiceDescription の値を取得または設定します。

Item[String]

ServiceDescription プロパティで指定された TargetNamespace を取得します。

List

IList インスタンス内の要素のリストを格納する CollectionBase を取得します。

(継承元 CollectionBase)
Table

ServiceDescriptionBaseCollection 内のキーと値の関連付けを実装するインターフェイスを取得します。

(継承元 ServiceDescriptionBaseCollection)

メソッド

Add(ServiceDescription)

指定した ServiceDescriptionServiceDescriptionCollection の末尾に追加します。

Clear()

CollectionBase インスタンスからすべてのオブジェクトを削除します。 このメソッドはオーバーライドできません。

(継承元 CollectionBase)
Contains(ServiceDescription)

指定した ServiceDescription がコレクションのメンバーかどうかを示す値を返します。

CopyTo(ServiceDescription[], Int32)

ServiceDescriptionCollection 型の 1 次元配列に、その配列内の指定した 0 から始まるインデックスを開始位置として ServiceDescription 全体をコピーします。

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetBinding(XmlQualifiedName)

ServiceDescriptionCollection を検索し、そのコレクションに格納されている Binding インスタンスのいずれかのメンバーである、指定した名前の ServiceDescription を返します。

GetEnumerator()

CollectionBase インスタンスを反復処理する列挙子を返します。

(継承元 CollectionBase)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetKey(Object)

参照によって渡された値に関連付けられているキーの名前を返します。

(継承元 ServiceDescriptionBaseCollection)
GetMessage(XmlQualifiedName)

ServiceDescriptionCollection を検索し、そのコレクションに格納されている Message インスタンスのいずれかのメンバーである、指定した名前の ServiceDescription を返します。

GetPortType(XmlQualifiedName)

ServiceDescriptionCollection を検索し、そのコレクションに格納されている PortType インスタンスのいずれかのメンバーである、指定した名前の ServiceDescription を返します。

GetService(XmlQualifiedName)

ServiceDescriptionCollection を検索し、そのコレクションに格納されている Service インスタンスのいずれかのメンバーである、指定した名前の ServiceDescription を返します。

GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IndexOf(ServiceDescription)

指定した ServiceDescription を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックス番号を返します。

Insert(Int32, ServiceDescription)

指定した 0 から始まるインデックス番号にある ServiceDescription に、指定した ServiceDescriptionCollection インスタンスを追加します。

MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
OnClear()

ServiceDescriptionBaseCollection インスタンスの内容を消去します。

(継承元 ServiceDescriptionBaseCollection)
OnClearComplete()

CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnInsert(Int32, Object)

CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnInsertComplete(Int32, Object)

ServiceDescriptionBaseCollection に新しい要素を挿入した後に、追加のカスタム プロセスを実行します。

(継承元 ServiceDescriptionBaseCollection)
OnRemove(Int32, Object)

ServiceDescriptionBaseCollection から要素を削除します。

(継承元 ServiceDescriptionBaseCollection)
OnRemoveComplete(Int32, Object)

CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnSet(Int32, Object, Object)

値を ServiceDescriptionBaseCollection 内の別の値に置き換えます。

(継承元 ServiceDescriptionBaseCollection)
OnSetComplete(Int32, Object, Object)

CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
OnValidate(Object)

値を検証するときに、追加のカスタム プロセスを実行します。

(継承元 CollectionBase)
Remove(ServiceDescription)

コレクションから、最初に出現する指定した ServiceDescription を削除します。

RemoveAt(Int32)

CollectionBase インスタンスの指定したインデックスにある要素を削除します。 このメソッドはオーバーライドできません。

(継承元 CollectionBase)
SetParent(Object, Object)

ServiceDescriptionBaseCollection インスタンスの親オブジェクトを設定します。

(継承元 ServiceDescriptionBaseCollection)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

ICollection.CopyTo(Array, Int32)

CollectionBase 全体を互換性のある 1 次元の Array にコピーします。コピー操作は、コピー先の配列の指定したインデックスから始まります。

(継承元 CollectionBase)
ICollection.IsSynchronized

CollectionBase へのアクセスが同期されている (スレッド セーフである) かどうかを示す値を取得します。

(継承元 CollectionBase)
ICollection.SyncRoot

CollectionBase へのアクセスを同期するために使用できるオブジェクトを取得します。

(継承元 CollectionBase)
IList.Add(Object)

CollectionBase の末尾にオブジェクトを追加します。

(継承元 CollectionBase)
IList.Contains(Object)

CollectionBase に特定の要素が格納されているかどうかを判断します。

(継承元 CollectionBase)
IList.IndexOf(Object)

指定した Object を検索し、CollectionBase 全体内で最初に見つかった位置の 0 から始まるインデックスを返します。

(継承元 CollectionBase)
IList.Insert(Int32, Object)

CollectionBase 内の指定したインデックスの位置に要素を挿入します。

(継承元 CollectionBase)
IList.IsFixedSize

CollectionBase が固定サイズかどうかを示す値を取得します。

(継承元 CollectionBase)
IList.IsReadOnly

CollectionBase が読み取り専用かどうかを示す値を取得します。

(継承元 CollectionBase)
IList.Item[Int32]

指定したインデックスにある要素を取得または設定します。

(継承元 CollectionBase)
IList.Remove(Object)

特定のオブジェクトが CollectionBase 内にあるときに、最初に出現したものを削除します。

(継承元 CollectionBase)

拡張メソッド

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

適用対象