次の方法で共有


Port.Extensions プロパティ

Port に関連付けられている機能拡張要素のコレクションを取得します。

Public ReadOnly Property Extensions As _
   ServiceDescriptionFormatExtensionCollection
[C#]
public ServiceDescriptionFormatExtensionCollection Extensions   {get;}
[C++]
public: __property ServiceDescriptionFormatExtensionCollection*
   get_Extensions();
[JScript]
public function get Extensions() :
   ServiceDescriptionFormatExtensionCollection;

プロパティ値

ServiceDescriptionFormatExtensionCollection

使用例

 

         ' Create a Port.
         Dim postPort As New Port()
         postPort.Name = "PortServiceHttpPost"
         postPort.Binding = New XmlQualifiedName("s0:PortServiceHttpPost")


         ' Create an HttpAddressBinding.
         Dim postAddressBinding As New HttpAddressBinding()
         postAddressBinding.Location = _
            "https://localhost/PortClass/PortService.vb.asmx"

         ' Add the HttpAddressBinding to the Port.
         postPort.Extensions.Add(postAddressBinding)

[C#] 
// Create a Port.
Port postPort = new Port();
postPort.Name = "PortServiceHttpPost";
postPort.Binding = new XmlQualifiedName("s0:PortServiceHttpPost");

// Create an HttpAddressBinding.
HttpAddressBinding postAddressBinding = new HttpAddressBinding();
postAddressBinding.Location = 
   "https://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort.Extensions.Add(postAddressBinding);

[C++] 
// Create a Port.
Port* postPort = new Port();
postPort->Name = S"PortServiceHttpPost";
postPort->Binding = new XmlQualifiedName(S"s0:PortServiceHttpPost");

// Create an HttpAddressBinding.
HttpAddressBinding* postAddressBinding = new HttpAddressBinding();
postAddressBinding->Location = 
   S"https://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort->Extensions->Add(postAddressBinding);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

Port クラス | Port メンバ | System.Web.Services.Description 名前空間