Compartilhar via


Port.Extensions Propriedade

Definição

Obtém a coleção de elementos de extensibilidade associados ao Port.

public:
 property System::Web::Services::Description::ServiceDescriptionFormatExtensionCollection ^ Extensions { System::Web::Services::Description::ServiceDescriptionFormatExtensionCollection ^ get(); };
public:
 virtual property System::Web::Services::Description::ServiceDescriptionFormatExtensionCollection ^ Extensions { System::Web::Services::Description::ServiceDescriptionFormatExtensionCollection ^ get(); };
public System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection Extensions { get; }
public override System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection Extensions { get; }
member this.Extensions : System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection
Public ReadOnly Property Extensions As ServiceDescriptionFormatExtensionCollection
Public Overrides ReadOnly Property Extensions As ServiceDescriptionFormatExtensionCollection

Valor da propriedade

ServiceDescriptionFormatExtensionCollection

A coleção de elementos de extensibilidade associados à porta.

Exemplos

// Create a Port.
Port^ postPort = gcnew Port;
postPort->Name = "PortServiceHttpPost";
postPort->Binding = gcnew XmlQualifiedName( "s0:PortServiceHttpPost" );

// Create an HttpAddressBinding.
HttpAddressBinding^ postAddressBinding = gcnew HttpAddressBinding;
postAddressBinding->Location = "http://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort->Extensions->Add( postAddressBinding );
// 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 =
   "http://localhost/PortClass/PortService_cs.asmx";

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

' 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 = _
   "http://localhost/PortClass/PortService.vb.asmx"

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

Aplica-se a