System.ServiceModel.Descrip ...


.NET Framework クラス ライブラリ
ServiceEndpoint クラス

更新 : 2007 年 11 月

サービスのクライアントがサービスを検索してサービスと通信できるようにするサービス エンドポイントを表します。

名前空間 :  System.ServiceModel.Description
アセンブリ :  System.ServiceModel (System.ServiceModel.dll 内)
構文

Visual Basic (宣言)
Public Class ServiceEndpoint
Visual Basic (使用法)
Dim instance As ServiceEndpoint
C#
public class ServiceEndpoint
Visual C++
public ref class ServiceEndpoint
J#
public class ServiceEndpoint
JScript
public class ServiceEndpoint
解説

サービス エンドポイントには、クライアントがこのエンドポイントでサービスを検索してサービスとの通信を行うために必要なアドレス、バインディング、コントラクト、および動作に関する情報が含まれます。


C#
Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);

ContractDescription cd = new ContractDescription("Calculator");
ServiceEndpoint svcEndpoint = new ServiceEndpoint(cd);

ServiceEndpoint endpnt = serviceHost.AddServiceEndpoint(
    typeof(ICalculator),
    new WSHttpBinding(),
    "CalculatorServiceObject");

Console.WriteLine("Address: {0}", endpnt.Address);

// Enable Mex
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
smb.HttpGetEnabled = true;
serviceHost.Description.Behaviors.Add(smb);

serviceHost.Open();
継承階層

System..::.Object
  System.ServiceModel.Description..::.ServiceEndpoint
スレッド セーフ

この型のすべてのパブリック static (Visual Basic では Shared) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム

Windows Vista, Windows XP SP2, Windows Server 2003

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

.NET Framework

サポート対象 : 3.5、3.0
参照

参照

タグ :


Page view tracker