This documentation is archived and is not being maintained.

Port.Extensions Property

Gets the collection of extensibility elements associated with the Port.

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

Property Value

A ServiceDescriptionFormatExtensionCollection.

Example

[Visual Basic] 

         ' 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)

[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 = 
   "http://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"http://localhost/PortClass/PortService_cs.asmx";

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

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Port Class | Port Members | System.Web.Services.Description Namespace

Show: