クリックして評価とフィードバックをお寄せください
MSDN
MSDN ライブラリ
.NET 開発
.NET Framework 3.5
.NET Framework 3.5
ServiceDescription クラス
 Endpoints プロパティ

  低帯域幅での表示をオンにする
このページは次のバージョンについて記述しています。
Microsoft Visual Studio 2008/.NET Framework 3.5

その他のバージョンについては、以下の情報を参照してください。
.NET Framework クラス ライブラリ
ServiceDescription..::.Endpoints プロパティ

更新 : 2007 年 11 月

サービスの説明からエンドポイントのコレクションを取得します。

名前空間 :  System.ServiceModel.Description
アセンブリ :  System.ServiceModel (System.ServiceModel.dll 内)
Visual Basic (宣言)
Public ReadOnly Property Endpoints As ServiceEndpointCollection
Visual Basic (使用法)
Dim instance As ServiceDescription
Dim value As ServiceEndpointCollection

value = instance.Endpoints
C#
public ServiceEndpointCollection Endpoints { get; }
Visual C++
public:
property ServiceEndpointCollection^ Endpoints {
    ServiceEndpointCollection^ get ();
}
J#
/** @property */
public ServiceEndpointCollection get_Endpoints()
JScript
public function get Endpoints () : ServiceEndpointCollection

プロパティ値

型 : System.ServiceModel.Description..::.ServiceEndpointCollection
サービスに定義されたエンドポイントを含む ServiceEndpointCollection

このメソッドによって返される ServiceEndpointCollection に含まれるエンドポイントには、サービスとの通信に必要なアドレス、バインディング、コントラクト、および動作の情報がそれぞれ含まれます。この情報にアクセスするには、関連する検索基準を使用して Find メソッドを実行して、コレクションから ServiceEndpoint を取得する必要があります。その後、ServiceEndpoint プロパティを使用して情報にアクセスします。たとえば、Contract プロパティを使用して ContractDescription にアクセスできます。

ServiceEndpoint をパラメータとして ExportEndpoint(ServiceEndpoint) に渡すことにより、サービス エンドポイントについてのメタデータをエクスポートします。

C#
// Iterate through the endpoints contained in the ServiceDescription
ServiceEndpointCollection sec = svcDesc.Endpoints;
foreach (ServiceEndpoint se in sec)
{
    Console.WriteLine("Endpoint:");
    Console.WriteLine("\tAddress: {0}", se.Address.ToString());
    Console.WriteLine("\tBinding: {0}", se.Binding.ToString());
    Console.WriteLine("\tContract: {0}", se.Contract.ToString());
    KeyedByTypeCollection<IEndpointBehavior> behaviors = se.Behaviors;
    foreach (IEndpointBehavior behavior in behaviors)
    {
        Console.WriteLine("Behavior: {0}", behavior.ToString());
    }
}

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

.NET Framework

サポート対象 : 3.5、3.0
コミュニティ コンテンツ   コミュニティ コンテンツとは
新しいコンテンツの追加 RSS  注釈
Processing
© 2009 Microsoft Corporation. All rights reserved. 使用条件  |  商標  |  プライバシー
Page view tracker