EndpointDiscoveryElement 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個設定元素,用來控制端點的發現功能。
public ref class EndpointDiscoveryElement sealed : System::ServiceModel::Configuration::BehaviorExtensionElement
public sealed class EndpointDiscoveryElement : System.ServiceModel.Configuration.BehaviorExtensionElement
type EndpointDiscoveryElement = class
inherit BehaviorExtensionElement
Public NotInheritable Class EndpointDiscoveryElement
Inherits BehaviorExtensionElement
- 繼承
-
EndpointDiscoveryElement
- 繼承
-
EndpointDiscoveryElement
備註
當元素加入端點的行為設定時, EndpointDiscoveryElement 允許啟用或停用端點的發現功能。 此外,它還允許指定自訂範圍 URI,以便在發現操作中用來過濾服務端點。 它也允許指定自訂的 XML 元資料,並與標準可發現的元資料一同發佈。
Note
該EndpointDiscoveryElement依賴於提供服務層級可偵測性控制的 。ServiceDiscoveryElement 這表示如果沒有元素EndpointDiscoveryElement,和ServiceDiscoveryElement其設定會被忽略。
以下範例展示了如何使用該 EndpointDiscoveryElement 元素並新增兩個作用域元素。
<configuration>
<system.serviceModel>
<services>
<service name="Microsoft.Samples.Discovery.CalculatorService"
behaviorConfiguration="calculatorServiceBehavior">
<endpoint address=""
binding="wsHttpBinding" contract="Microsoft.Samples.Discovery.ICalculatorService"
behaviorConfiguration="ep1Behavior" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="calculatorServiceBehavior">
<serviceDiscovery />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="ep1Behavior">
<endpointDiscovery enabled="true">
<scopes>
<add scope="http://www.example.org/engineering/calculator"/>
<add scope="ldap:///ou=engineering,o=exampleorg,c=us"/>
</scopes>
</endpointDiscovery>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
建構函式
| 名稱 | Description |
|---|---|
| EndpointDiscoveryElement() |
建立一個新的類別實例 EndpointDiscoveryElement 。 |