本文整理汇总了VB.NET中System.Web.Services.Description.Port类的典型用法代码示例。如果您正苦于以下问题:VB.NET Port类的具体用法?VB.NET Port怎么用?VB.NET Port使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Port类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Port
' 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)
' Get the Service of the postPort.
Dim myService As Service = postPort.Service
' Print the service name for the port.
Console.WriteLine("This is the service name of the postPort:*" & _
myDescription.Services(0).Ports(0).Service.Name & "*")
' Add the Port to the PortCollection of the ServiceDescription.
myDescription.Services(0).Ports.Add(postPort)