WebHttpElement 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
透過設定來啟用端 WebHttpBehavior 點。
public ref class WebHttpElement sealed : System::ServiceModel::Configuration::BehaviorExtensionElement
public sealed class WebHttpElement : System.ServiceModel.Configuration.BehaviorExtensionElement
type WebHttpElement = class
inherit BehaviorExtensionElement
Public NotInheritable Class WebHttpElement
Inherits BehaviorExtensionElement
- 繼承
- 繼承
範例
此樣本回傳類型 WebHttpElement。
using System;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Configuration;
class Program
{
static void Main(string[] args)
{
WebHttpElement webHttpElement = new WebHttpElement();
Console.WriteLine("The type is: {0}", webHttpElement.BehaviorType);
Console.WriteLine("Press <ENTER> to terminate the program.");
Console.ReadLine();
}
}
備註
這是一個WebHttpElementBehaviorExtensionElement子型別,可用於端點的配置中包含 。WebHttpBehavior WebHttpBehavior 行為與 WebHttpBinding 綁定結合使用時,使網頁程式設計模型可用於 Windows Communication Foundation(WCF)服務。 請注意,該 WebServiceHost 會自動將此行為加入使用該 WebHttpBinding功能的端點。
建構函式
| 名稱 | Description |
|---|---|
| WebHttpElement() |
初始化 WebHttpElement 類別的新執行個體。 |