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();
}
}
注釈
WebHttpElementはBehaviorExtensionElementサブタイプであり、構成を通じてエンドポイントにWebHttpBehaviorを含めるために使用できます。 WebHttpBehavior 動作は、WebHttpBinding バインディングと組み合わせて使用すると、Windows Communication Foundation (WCF) サービスの Web プログラミング モデルを有効にします。 WebServiceHostによって、WebHttpBindingを使用するエンドポイントにこの動作が自動的に追加されることに注意してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| WebHttpElement() |
WebHttpElement クラスの新しいインスタンスを初期化します。 |