本文整理汇总了VB.NET中System.ServiceModel.Description.WsdlExporter类的典型用法代码示例。如果您正苦于以下问题:VB.NET WsdlExporter类的具体用法?VB.NET WsdlExporter怎么用?VB.NET WsdlExporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WsdlExporter类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Module1
' 导入命名空间
Imports System.ServiceModel
Imports System.ServiceModel.Description
Module Module1
Sub Main()
Dim exporter As New WsdlExporter()
exporter.PolicyVersion = PolicyVersion.Policy15
Dim myServiceEndpoints() As ServiceEndpoint = New ServiceEndpoint(1) {}
Dim myDescription As New ContractDescription("myContract")
myServiceEndpoints(0) = New ServiceEndpoint(myDescription, New BasicHttpBinding(), New EndpointAddress("http://localhost/myservice"))
myServiceEndpoints(1) = New ServiceEndpoint(myDescription, New BasicHttpBinding(), New EndpointAddress("http://localhost/myservice"))
'Export all endpoints for each endpoint in collection.
For Each endpoint As ServiceEndpoint In myServiceEndpoints
exporter.ExportEndpoint(endpoint)
Next
'If there are no errors, get the documents.
Dim metadataDocs As MetadataSet
metadataDocs = Nothing
If (exporter.Errors.Count = 0) Then
metadataDocs = exporter.GetGeneratedMetadata()
End If
End Sub
End Module