ServiceEndpoint.ListenUriMode ServiceEndpoint.ListenUriMode ServiceEndpoint.ListenUriMode ServiceEndpoint.ListenUriMode Property

定義

リッスンするサービスに提供される URI をトランスポートが処理する方法を指定する値を取得または設定します。Gets or sets how the transport handles the URI that is provided for the service to listen on.

public:
 property System::ServiceModel::Description::ListenUriMode ListenUriMode { System::ServiceModel::Description::ListenUriMode get(); void set(System::ServiceModel::Description::ListenUriMode value); };
public System.ServiceModel.Description.ListenUriMode ListenUriMode { get; set; }
member this.ListenUriMode : System.ServiceModel.Description.ListenUriMode with get, set
Public Property ListenUriMode As ListenUriMode

プロパティ値

サービス エンドポイントの ListenUriModeThe ListenUriMode for the service endpoint. 既定値は Explicit です。The default value is Explicit.

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

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

Console.WriteLine("Service endpoint {0} contains the following:", endpoint.Name);
Console.WriteLine("Binding: {0}", endpoint.Binding.ToString());
Console.WriteLine("Contract: {0}", endpoint.Contract.ToString());
Console.WriteLine("ListenUri: {0}", endpoint.ListenUri.ToString());
Console.WriteLine("ListenUriMode: {0}", endpoint.ListenUriMode.ToString());
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

Dim endpoint As ServiceEndpoint = serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

Console.WriteLine("Service endpoint {0} contains the following:", endpoint.Name)
Console.WriteLine("Binding: {0}", endpoint.Binding.ToString())
Console.WriteLine("Contract: {0}", endpoint.Contract.ToString())
Console.WriteLine("ListenUri: {0}", endpoint.ListenUri.ToString())
Console.WriteLine("ListenUriMode: {0}", endpoint.ListenUriMode.ToString())

注釈

ListenUriMode の値は、トランスポートが ListenUri を処理する方法を決定するために使用されます。The value of the ListenUriMode is used to determine how the transport handles the ListenUri.

適用対象