本文整理汇总了VB.NET中System.ServiceModel.Description.WsdlExporter.GetGeneratedMetadata方法的典型用法代码示例。如果您正苦于以下问题:VB.NET WsdlExporter.GetGeneratedMetadata方法的具体用法?VB.NET WsdlExporter.GetGeneratedMetadata怎么用?VB.NET WsdlExporter.GetGeneratedMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ServiceModel.Description.WsdlExporter
的用法示例。
在下文中一共展示了WsdlExporter.GetGeneratedMetadata方法的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